How do i make a button that switches through 3 scenes?

here is the code that im curently using. im trying to go from the first scene, to the second, to the third then back to the first with just one button.

using UnityEngine;
using UnityEngine.SceneManagement;

public class ButtonManager : MonoBehaviour
{
public void NextScene()
{
SceneManager.LoadScene(“fire”);
}
}

//only works if the first scene has build index 0, second has build index 1, etc.
public void NextScene()
{
    SceneManager.LoadScene((SceneManager.GetActiveScene().buildIndex + 1) % 3);
}