How to start another Coroutine after a specific condition is met while another Coroutine is running?

I’m creating a defense game wherein different types of enemies would rush towards the player’s base. I would like to design it as if there would be newer enemies as the player achieves a specific amount of score. So far, I made a Coroutine for the first enemy type (easysphere) to spawn. But then, I would like a new enemy type (mediumsphere) to spawn after the player achieves a score of 30. However, when the score hits 30, there are just too much instantiated mediumspheres as if it fills up the entire game view. I just wanted it to spawn normally within the interval of 4 seconds.

Here’s my code:

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

public class SpawnController : MonoBehaviour
{
    public GameObject easysphere, mediumsphere;
    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(SpawnEnemy());
    }

    // Update is called once per frame
    void Update()
    {
        if (PlayerController.scores == 30)
        {
            StartCoroutine(SpawnMediumSphere());
        }
    }
    IEnumerator SpawnEnemy()
    {
        while (true)
        {
            float x = Random.Range(-360f, 360f);
            float z = Random.Range(-300f, -270f);

            GameObject a = Instantiate(easysphere);
            a.transform.position = new Vector3(x, 0.5f, z);

            yield return new WaitForSeconds(2f);
        }
    }
    IEnumerator SpawnMediumSphere()
    {
        while (true)
        {
            float x = Random.Range(-360f, 360f);
            float z = Random.Range(-270f, -240f);

            GameObject b = Instantiate(mediumsphere);
            b.transform.position = new Vector3(x, 0.5f, z);

            yield return new WaitForSeconds(4f);
        }
    }
}

Your “StartCoroutine(SpawnMediumSphere());” is in Update, it means it will be called every frame while the player has a score of 30.
So it will start multiple coroutines.
You need to launch it only one time.
Maybe try will a bool that tell if you have already start the medium coroutine