Syncing variables between two objects of same script

I have a case that i need to sync changes to variables in two objects of same class. When a change happen to one it changes the other.
i thought of making a public property for every variable and adding an action within it’s Set part to set the private variable for both objects whenever i call a change for the public property.
something like this

 private bool _connected;
    public bool Connected{
        get => _connected;
        set{_connected = value;

BUT i think there is something easier and i don’t know where to look.

In one script just write TheFirstVariable = OtherScript.TheSecondVariable And in the other, TheSecond Variable = script.TheFirstVariable Make sure to put these lines in Update()

Keep in mind that this will only work on runtime.