How to spawn enemy every set time?

I want my prefab “enemy” to spawn every 3 seconds after the previous enemy has been destroyed. Currently my code doesn’t work because of two things. Firstly, I can’t destroy the enemy upon death because that would disable the script. Secondly, I can’t use WaitForSeconds(3) between the death and spawn because that can’t be called in an update function. I also can’t use InvokeRepeating because I want it to spawn my variable enemy prefab and when I use InvokeRepeating it spawns saying that the variable enemy is missing the prefab i dragged in. Here is my code:

#pragma strict

var enemyHealth = 10;
var clickDamage = 5;
var enemy : GameObject;
var spawnWaitTime = 2;

function Start() {
	//InvokeRepeating ("Spawn", 1, spawnWaitTime);
}

function Update() {
	if(Input.GetMouseButtonDown(0)) {
		enemyHealth -= clickDamage;
		
		if (enemyHealth <= 0) {
			Death();
		}
	}
}

function Death() {
	//gameObject.renderer.enabled = false;
	Destroy(gameObject);
    WaitForSeconds(3);
    Spawn();
}

function Spawn() {
	var newEnemy = Instantiate(enemy, transform.position, transform.rotation);
}

You have multiple options here.

The easiest one would be to spawn a new enemy right after the other got killed. This new enemy would be invisible until your three seconds are over.

The next option would be some kind of enemy manager. This would be an object which manages all your enemies. It would spawn the enemies and keep track of em. This object can spawn a new enemy 3 seconds after the other got killed with a timer or whatever method you like to use.

A third option would be to not destroy your enemy at all but to set a boolean “alive” to false and then start a timer. Once the timer reaches 3 seconds you can respawn this enemy by calling a function which resets all your values.