How can I make a C# sharp script execute in a certain order?

I have two scripts that checks if there is network connection and the version of the game (if it’s up to date) and then load the game but it’s not working properly.

How do I make it follow this pattern?:

  1. Check if there is internet connection

  2. Check the version of the game

  3. Only load the game if there is an internet connection and the version of the game is up to date

CheckNetwork.cs

public Text AlertText;
public GameObject alert;

public string URL = "";
public string CurrentVersion;
string latestVersion;
public GameObject newVersionAvailable;

private void Start()
{
    StartCoroutine(LoadTxtData(URL));
}
void Awake()
{
    if (Application.internetReachability == NetworkReachability.NotReachable)
    {
        alert.SetActive(true);
        AlertText.text = "Sorry, you have to enable your conection to play this game";
        if (Input.GetKey(KeyCode.Escape))
            Application.Quit();
         if (Input.GetKey(KeyCode.Escape))
            {
                Application.Quit();
            }
    }
    else
    {
        alert.SetActive(false);
    }
}
public void CheckVersion()
{
    if(CurrentVersion != latestVersion)
    {
        newVersionAvailable.SetActive(true);
    }
    else
    {
        newVersionAvailable.SetActive(false);
    }
}
private IEnumerator LoadTxtData(string url)
{
    UnityWebRequest www = UnityWebRequest.Get(url);
    yield return www.SendWebRequest();
    latestVersion = www.ToString();
    CheckVersion();

}
public void OpenURL(string url)
{
    Application.OpenURL(url);
}

Loading.cs

private Image progressBar;
private void Start()
{
    
    StartCoroutine(LoadAsyncOperation());
}
public IEnumerator LoadAsyncOperation()
{
        AsyncOperation gameLevel = SceneManager.LoadSceneAsync(1);
        while (gameLevel.progress < 1)
        {
            progressBar.fillAmount = gameLevel.progress;
            yield return new WaitForEndOfFrame();
        }
    }

try changing removing the start method from the loading.cs

private Image progressBar;

public IEnumerator LoadAsyncOperation()
{
     AsyncOperation gameLevel = SceneManager.LoadSceneAsync(1);
     while (gameLevel.progress < 1)
     {
         progressBar.fillAmount = gameLevel.progress;
         yield return new WaitForEndOfFrame();
     }
 }

and in the checknetwork script change the checkversion to this

public void CheckVersion()
{
    if(CurrentVersion != latestVersion)
    {
        newVersionAvailable.SetActive(true);
    }
    else
    {
        newVersionAvailable.SetActive(false);
        loading.StartCoroutine(LoadAsyncOperation());
    }
}

you need to create a

public Loading loading; 

var and assign it in the inspector