I used Ternary Operator for a different approach on LoadNextLevel function and wanted to share
Ternary Operator C# - Microsoft
void LoadNextLevel()
{
// Getting current level index
int currentLevelIndex = SceneManager.GetActiveScene().buildIndex;
// Calculating the last level index
int lastLevelIndex = SceneManager.sceneCountInBuildSettings - 1;
// Calculating next level index
int nextLevelIndex = currentLevelIndex < lastLevelIndex ? currentLevelIndex + 1 : 0;
SceneManager.LoadScene(nextLevelIndex);
}