How to instantiate and destroy objects with 2d trigger

I am making a 2d game: Car Escape.

I want to make 50 levels in one scene. Levels are prefabs and I need some help with code. How can I make level 1 show initially and if I passed level 1, instantiate level 2 and destroy level 1 with OnTriggerEnter2D, etc.

public class WinZoneScript : MonoBehaviour {
    
        // Reference to WinText game object
        public GameObject []levels;     //levels map
        public GameObject panel;    //panel  next button to go to next level
        public int level;    // number of ever levels 
    
    	//Use this for initialization
    	void Start ()
        {
            panel.gameObject.SetActive(false);
            level = PlayerPrefs.GetInt("level", level);
            levels[level].gameObject.SetActive(enabled);
        }
    
        // If target car (red one) exits the playground
        void OnTriggerEnter2D (Collider2D col)
    	{
            // then "You Win!" sign is turned on
            
            levels[level].gameObject.SetActive(false);
            panel.gameObject.SetActive(enabled);
            PlayerPrefs.SetInt("level", level);
        }
    
        public void Next()
        {
            PlayerPrefs.GetInt("level", level);
            panel.gameObject.SetActive(false);
            PlayerPrefs.Save();
        }

You need to instantiate your each level prefabs. So your script should be like:

public GameObject []levels;     //levels map
public GameObject panel;    //panel  next button to go to next level
public int level;    // number of ever levels 
private GameObject activeLevel;

void Start() {
    panel.gameObject.SetActive(false);
    level = PlayerPrefs.GetInt("level", level);
    activeLevel = Instantiate(levels[level]);
}

// If target car (red one) exits the playground
void OnTriggerEnter2D(Collider2D col) {
    // then "You Win!" sign is turned on
    //player presses proceed button and Next method is called
}

public void Next() {
    Destroy(activeLevel); //unless you want to just deactivate it
    if(level < levels.Length - 1){ //get the mext level if available
        level++;
        PlayerPrefs.SetInt("level", level);
        PlayerPrefs.Save();
        activeLevel = Instantiate(levels[level]);
    }
}