IEnumerator and WaitForSeconds doesnt work proper

Hi, I try to simulate time and want to add 10 minutes every few seconds, but the programm doesn’t wait for the amount of seconds and just repeats the script like every millisecond.
Here is my Code thank you for helping.

IEnumerator CalculateTime()
{

    if (TimeSwitch == false)
    {
        TimeMinutes += 10;
        if (TimeMinutes >= 60)
        {
            TimeMinutes = 0;
            TimeHours += 1;
        }

        TTime.text = TimeHours.ToString() + ":" + TimeMinutes.ToString();
        
        
    }

    if (TimeHours == 20 && TimeSwitch == false)
    {
        TimeSwitch = true;
        Debug.Log("END");
    }
    yield return new WaitForSeconds(5);
    Debug.Log("Wait");
}

Your coroutine does all the code inside exactly once - you have no loop in it. So if the stuff in there happens multiple times, it’s because you start that coroutine multiple times. And sincy you’re saying that it happens very often per second, my bets are that you are calling StartCoroutine, or at least this method every frame.

So instead of starting this coroutine in Update, start it in Start:

void Start()
{
  StartCoroutine(CalculateTime());
}

Next up, do what @Cover-Club-Media said, and put all this in a loop, because otherwise your coroutine will just finish after the wait, and do nothing else after it.