Singleton calls a function multiple times when new scene is loaded. How would I stop this from happening?

private void Awake()
{
DontDestroyOnLoad(gameObject);
if (instance == null)
{
print(“newnew”);
instance = this;
SceneManager.sceneLoaded += instance.OnSceneLoaded;
}
else {
print(“exterminate”);
ActiveManager = false;
GameObject.Destroy(gameObject);
}

    }

in else you need to check current instance is this or not.

like

else if(instance != this)
{

// bla bla

}