Change a variable in a different object?

im making a monster card game, how would i be able to set a hand of cards be able to place cards? should i use update and check a variable for who’s turn it is?

but in a broader sense how would i tell one object to tell another object that int i = 1 instead of 0
i could think of doing this by spawning an object that holds this information, colliding it into the second object, have the second object read the information from the object, then delete the object, and update its own fields, but this seems tedious and rube goldberg-y.

For example. you have two scripts and you have one attached to an object with a tag “ObjectOne” and another one with a tag “ObjectTwo”.

 class ScriptOne: MonoBehaviour {
      // This is attached to ObjectOne
      // This would be the integer you would change from ObjectTwo
      public int integerToChange = 0;

      // And for the sake of it, this is the function you will call from ObjectTwo
      public void MethodToCall () { 
           Debug.Log(integerToChange);
      }
 }
 class ScriptTwo: MonoBehaviour {
      // What you need to do, is to get a reference, of type GameObject so you could store the 
      // ObjectOne and ScriptOne so you could store 'ScriptOne' component. 
      // It's a component, when it's attached to a GameObject
      GameObject referenceObject;
      ScriptOne referenceScript;
 
      void Start(){
      // Now in the start method, you need to get the references of these things inside a scene.
      // To find the GameObject with tag "ObjectOne" you would use:

      referenceObject = GameObject.FindObjectWithTag("ObjectOne");

      // this method searches the scene for object, which is tagged "ObjectOne" and
      // assigns it to the 'referenceObject' variable
      // Now you need to get the component called 'ScriptOne' that's attached to the object.

      referenceScript = referenceObject.GetComponent<ScriptOne>();

      // you call GetComponent <ComponentType>() on the referenceObject and it returns
      // the component of the type that you specified between < > (if it has one).

      // Now you can change the variable inside the ObjectOne, from the inside of ObjectTwo

      referenceScript.integerToChange = 1;

      // You can launch a method that's defined in 'ScriptOne' as well

      referenceScript.MethodToCall();

      // Note: both the integerToChange and MethodToCall() has to have 'public' in front of them
      // so that you would be able to call them from outside the ScriptOne.
      
      }
 }

I really hope it’s clear enough.