Fixing simple timer script

I have a very plain script for a timer that explodes after it runs out. But the explosion effect is repeated 1000 times because it is inside Update. Where should i put Instantiate line so it’s not repeated every frame?
p.s. sorry if it sounds like a way too easy question - its not easy for me…

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

public class timer : MonoBehaviour
{

    TextMeshProUGUI mText;

    public Transform SpecialEffectLocation;

    public GameObject SpecialEffect;

    public float theTimer = 10;
     void Start()
    {
       mText = gameObject.GetComponent<TextMeshProUGUI>();
       } void Update()
    {
        mText.text = theTimer.ToString("00");
        if (theTimer > 0)
        {
            theTimer -= Time.deltaTime;
        }
        if (theTimer <= 0)
        {
            GameObject timer = Instantiate(SpecialEffect, SpecialEffectLocation.position, SpecialEffectLocation.rotation);
        }
    }
}

You have a bunch of different options.

Either you destroy the script after the explosion is instantiated so it stops executing.

Or you add some extra validation to check if the explosion has already happened before.
For example,
You can set a bool to true after it exploded and check if the bool is true then return out of the method.

private bool _hasExploded = false;
void Update()
{
     mText.text = theTimer.ToString("00");

     if (theTimer > 0) 
     {
         theTimer -= Time.deltaTime;
     }

     if (theTimer <= 0 && !_hasExploded)
     {
         GameObject timer = Instantiate(SpecialEffect, SpecialEffectLocation.position, SpecialEffectLocation.rotation);
         _hasExploded = true;
     }
 }