I'm trying to create a progress loading bar and i keep getting the error message, "NullReferenceException: Object reference not set to an instance of an object". I'm kinda new to Unity, what am i doing wrong, am i missing something?

using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class loadingBar : MonoBehaviour {

AsyncOperation ao;
public GameObject loadingScreenBG;
public GameObject loadingLogo;
public Image progBar;
public Text loadingText;

void Start()
{
    StartCoroutine(loadmainScene());
    StartCoroutine(LoadLevelwithRealProgress());
}

void Update()
{
    
}

IEnumerator loadmainScene()
{
    loadingScreenBG.SetActive(true);
    loadingLogo.SetActive(true);
    yield return new WaitForSeconds(1);
    progBar.gameObject.SetActive(true);
    loadingText.gameObject.SetActive(true);
    loadingText.text = "Loading. . .";
}

IEnumerator LoadLevelwithRealProgress()
{
    yield return new WaitForSeconds(1);

    ao = SceneManager.LoadSceneAsync(1);
    ao.allowSceneActivation = true;
    
    while(!ao.isDone)
    {
        progBar.fillAmount = ao.progress;
        Debug.Log(ao.progress);
        yield return null;
    }
}

}

I figured it out, stupid me lol. I was asking it to load Scene 1 but i forgot to add Scene 1 in the build settings… such a silly mistake lol…