In the Picture you can see a Hierachy of multiple objects.
In every Object (in this example a sprite object) is the same script. And i want that object “New Sprite” Activate the next Sprite and deactivate itself from the script.
Put a public reference to the object you care about (in this case likely a GameObject) and call methods on it, likely the GameObject.SetActive() method.
This is basically how 100% of inter-script calls are done in Unity. You really want to get stone-cold familiar with this pattern, as it is used EVERYWHERE.