Yeah learning scripting can be a pain when things keep changing! This is now done using ‘Scene Manager’.
Add this using statement to the top of the file:
using UnityEngine.SceneManagement;
And replace the obsolete code with this:
if (SceneManager.GetActiveScene().name != "Scene0")
SceneManager.LoadScene("Scene0");
Also when posting code, use ‘code tags’ to format it correctly: Using code tags properly