I am trying to create a custom SwiftUI View but I am getting problem in updating value through ObservedObject.
import SwiftUI
import Combine
struct ContentView: View {
    @ObservedObject var model:InfoViewModel = InfoViewModel()
    var body: some View {
        VStack(alignment: .leading){
            CustomView(value: self.model.title)
                .frame(width: 200, height: 200, alignment: .center)
        }
        .background(Color.green)
        .frame(minWidth: 0,
               maxWidth: .infinity,
               minHeight: 0,
               maxHeight: .infinity,
               alignment: .topLeading)
    }
}
struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
struct CustomView: UIViewRepresentable {
    typealias UIViewType = UIView
    var value:String
    var lblTitle:UILabel = UILabel()
    func makeUIView(context: Context) -> UIView {
        let view:UIView = UIView()
        view.addSubview(lblTitle)
        lblTitle.text = value
        lblTitle.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        lblTitle.backgroundColor = UIColor.red
        lblTitle.textColor = UIColor.black
        return view
    }
    
    func updateUIView(_ uiView: UIView, context: Context) {
        self.lblTitle.text = value
        print("LBLTitle:\(self.lblTitle.text!)\nTitleValue:\(self.value)")
    }
}
class InfoViewModel: ObservableObject, Identifiable {
    @Published var title = "Title"
    private var count = 0
    init() {
        _ = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(fireTimer), userInfo: nil, repeats: true)
    }
    
    @objc func fireTimer() {
        count += 1
        
        self.title = "\(self.count)"
        print("Timer fired!\n\(self.title)")
    }
}
Project can be download from here
Edit: I changed code after @Asperi answer now it is updating value. but as Dávid Pásztor suggested it is not right to create @ObservedObject inside struct then how I will pass the value to CustomView with creating @ObservedObject and link that David provided is old and code in that thread now seems not working.
Here is the code that is working
struct CustomView: UIViewRepresentable {
    typealias UIViewType = UIView
    var value:String
    
    func makeUIView(context: Context) -> UIView {
        let view:UIView = UIView()
        let lblTitle:UILabel = UILabel()
        view.addSubview(lblTitle)
        lblTitle.text = value
        lblTitle.frame = CGRect(x: 0, y: 0, width: 100, height: 100)
        lblTitle.backgroundColor = UIColor.red
        lblTitle.textColor = UIColor.black
        return view
    }
    
    func updateUIView(_ uiView: UIView, context: Context) {
        for view in uiView.subviews
        {
            if(view.isKind(of: UILabel.self))
            {
                (view as! UILabel).text = value
                print("LBLTitle:\((view as! UILabel).text!)\nTitleValue:\(self.value)")
            }
        }
        
        
    }
}