Scene.isLoaded not working properly.

So I have a very simple and small code that should do the following:
Load Scene; After loaded, do stuff.
For making sure the scene would have enough time for loading, I called the LoadScene() function and made a loop under it that executes a million times (not kidding lol) checking if the scene has loaded. It never returns true. The code:

if (Input.GetMouseButtonDown(1))
{
  SceneManager.LoadScene(sceneToLoad); //previously defined scene name (string)
  for (int i = 0; i < 1000000; i++)
  {
    if (SceneManager.GetSceneByName(sceneToLoad).isLoaded)
    {
      //do stuff
      break;
    }
  }
}

Apart from the one million runs loop, what’s wrong with my code?

That loop does not cause any waiting, as it’s executed synchronously. So the loading probably doesn’t even start before you ask if it’s done. Also you break the loop during the first execution.
The correct way would be to check if the scene is loaded, then actually wait at least one frame before checking again. Check out coroutines or c# async/await pattern, those might help.