Some Codes not working on Unity 6

  print("Task completed successfully.");
  SceneManager.LoadScene("MainMenu 1");
  print("Task completed successfully.22");

SceneManager not working.
Do I need to make any settings in Unity.

My Project was an old project.I moved it to Unity 6.Everything works in the editor.

But most of them do not work on mobile.The print below does not work either.

(I apologize if I wrote something wrong, English is not my first language.)

“Not working” is not a problem statement. Check the Console or log files for error messages.

Well the fact the second print doesnt work would suggest the loadscene errored, the error contains the answer which likely says not in build…