Can anyone help me fix my Timer issue.

So, I have a feature in my project which checks if the player’s Coin count is < 50 then starts a 10-second timer.
Once the timer hits 0, It gives the player another coin and resets the timer to 10.
This continues until 50 again.

The below script I have works, so long as the Coin count starts below 50 (because it’s being called on start).
I’m derping and can’t figure out how to have it called once the player’s coin count (save.coincount) goes from 50 to 49.
The only way I can figure out to check is in update, but it obviously starts the timer multiple times and bugs out.

  public int time = 10;
  public SaveScript save;

  public bool TimerActive = false;

    void Start()
    {
      StartTimer();
    }

    public void StartTimer()
    {
      if(save.coinCount < 50)
      {
        TimerActive = true;
        time = 10;
        InvokeRepeating ("UpdateTimer", 1.0f, 1.0f);
      }
      else
      {
        return;
      }
    }

    void FixedUpdate()
    {
      NextCoinTextTMP.text = ("Next coin in: " + time.ToString());

      if (time == 0 && save.coinCount < 50)
      {
        save.coinCount++;
        time = 10;
      }
      if(save.coinCount > 49)
      {
        textObject.SetActive(false);
        TimerActive = false;
        time = 10;
      }
      else
      {
        textObject.SetActive(true);
       }
    }
    void UpdateTimer()
    {
      time--;
    }

If anyone can help, I would greatly appreciate it.

I’m not able to test the following script, but it might give you an idea how I would deal with the situation. I just check if a timer is running. If it isn’t check the coin count. When the coin count is lower than 50, start the timer, else ignore it and just set the text to invisible.

 public float timer = 10f;
    public SaveScript save; 
    public bool timerActive = false;
    
    public void Start()
    {
    	CheckCoinCount();
    }
    
    public void CheckCoinCount()
    {
    	if(save.coinCount < 50){
    		StartNewTimer(10f);
    		textObject.SetActive(true);
    	}
    	else
    	{
    		textObject.SetActive(false);
    	}
    }
    
    public void StartNewTimer(float timerTime){
    	timer = timerTime;
    	timerActive = true;	
    }
    
    public void TimerEnd(){
    	save.coinCount++;
    	timerActive = false;
    	CheckCoinCount();
    }
    
    public void Update()
    {
    	if(timerActive)
    	{
    		timer -= 1 * Time.deltaTime;
    		
    		if(timer < 0)
    		{
    			TimerEnd();
    		}
    	}
    	else
    	{
    		CheckCoinCount();
    	}
    	
    	NextCoinTextTMP.text = ("Next coin in: " + timer.ToString());
    }