add the enemies to a list/array stored in the spawner script (or perhaps better handled as a static list on the enemy script, so that other scripts could use it). when you spawn them, have the spawner listen to a static event “OnDeath” that is raised from the enemy when they are killed (via damage, not the destroy command, to avoid bugs where a level is restarted or returned to the main menu which could cause you going to the next level). the spawner will be listening to this event, removing the enemy from their list
after which the spawner can check if the list is empty. If so, spawn the next wave, otherwise load the next level.