Need some help with Enemy Spawning Script...

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemySpawner : MonoBehaviour
{
    [SerializeField] List<WaveConfig> waveConfigs;
    [SerializeField] int startingWave = 0;

    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(SpawnAllWaves());
    }

    void Update()
    {
    }

    private IEnumerator SpawnAllWaves()
    {
        for(int EnemyWaveCount = startingWave ; EnemyWaveCount < waveConfigs.Count;)
        {
            var currentWave = waveConfigs[EnemyWaveCount];
            yield return StartCoroutine(SpawnEnemiesInWave(currentWave));
        }
    }

    public IEnumerator SpawnEnemiesInWave(WaveConfig waveConfig)
    {
        for(int enemyCount = startingWave ; enemyCount < waveConfig.GetNumberOfEnemies() ; enemyCount++)
        {
            var newEnemy = Instantiate(waveConfig.GetEnemyPrefab(), waveConfig.GetWaypoints()[0].transform.position, Quaternion.identity);
            newEnemy.GetComponent<EnemyPathing>().SetWaveConfig(waveConfig);
            yield return new WaitForSeconds(waveConfig.GetTimeBetweenSpawns());
        }
    }
}

Here I have WaveConfig asset which contains the details regarding the spawning…Like EnemyPrefab, EnemyPathPrefab, TimeBetweenSpawns, NoOfEnemiesPerWave.
In the Above script the list of waveconfigs are serialized and used to spawn the enemy waves. The script works fine it spawn the Waves but I want to spawn the second wave after the enemies in the first one are destroyed or after a particular time period for each wave. Can someone help me with this script.
This is the waveconfig script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[CreateAssetMenu(menuName = "Enemy Wave Config")]
public class WaveConfig : ScriptableObject
{
    [SerializeField] GameObject enemyPrefab;
    [SerializeField] GameObject pathPrefab;
    [SerializeField]      float timeBetweenSpawns = 0.5f;
    [SerializeField]      float spawnRandomFactor = 0.3f;
    [SerializeField]        int numberOfEnemies   = 5;
    [SerializeField]      float moveSpeed         = 2f;

    public GameObject GetEnemyPrefab()  { return enemyPrefab; }

    public List<Transform> GetWaypoints()
    {
        var waveWaypoints = new List<Transform>();
        foreach(Transform Child in pathPrefab.transform)
        {
            waveWaypoints.Add(Child);
        }
        return waveWaypoints;
    }

    public float GetTimeBetweenSpawns() { return timeBetweenSpawns; }

    public float GetSpawnRandomFactor() { return spawnRandomFactor; }

    public   int GetNumberOfEnemies()   { return numberOfEnemies; }

    public float GetMoveSpeed()         { return moveSpeed; }
}

You could assign the spawned enemies to a List when they are spawned, then when they die/are removed, remove them from the List. When this list is empty (or when a certain wave time is reached), start spawning a new wave of enemies.