I want to randomly pick a wave to spawn everytime

using UnityEngine;

public class BlockSpawner : MonoBehaviour
public Transform[] spawnPoints;

public GameObject blockPrefab;

public float timeBetweenWaves = 2f;
private float timeToSpawn = 2f;

void Update()
if (Time.time >= timeToSpawn)

timeToSpawn = Time.time + timeBetweenWaves;

void spawnBlocks() // I want to add another one of these and i want it to pick from them

int randomIndex = Random.Range(0, spawnPoints.Length);
for (int i = 0; i < spawnPoints.Length; i++) // i want to add one like this for (int i =1;i

you can simply check for the value of randomIndex value using if else statements and if certain conditions met then spawn according to that!!