Load scene with buildindex equal to a int variable.

Hi. I’m new to unity and I want to ask : How can I load a scene by buildindex by an int variable? Like I have an int = 3 and how can I load the scene with the buildindex = int = 3? i have public int level = SceneManager.GetActiveScene().buildIndex; and I have a saving script so that when I enter the game i load the scene with buildindex int value. How can I do that? SceneManager.LoadScene and next?

you could simply use built in method for int values:
SceneManager.LoadScene(level);

Example:

    public class MySceneManager : MonoBehaviour
    {
        void Start()
         {
               LoadLevel(0);
         }
        public void LoadLevel(int level)
        {
            SceneManager.LoadScene(level);
        }
    }