How to access the properties of any created Game Object from another script Unity C # 2D

I have instantiated multiple game objects like this part of the code:

GameObject newCard = Instantiate(CardPrefab, new Vector3(x, y, z), transform.rotation);
x,y and z being parameter so I could spawn the objects in different positions.

My question is how could I access the name of the Game objects or the properties from another script. Each of my game objects has a property which gives it a value.

In another script I want to add the values of all objects but I am not sure how to access the objects from another script to get their name and values.

Thanks for the support.

You can reference an instantiated GameObject the same ways you reference any other GameObject…except you can’t assign it in the inspector before pressing play as it is instantiated at runtime…you can take your newCard variable and use GetComponent, etc. to grab what you need. If you make your newCard variable public you could reference the variable from another script.