In order to execute a function after a delay in Unity, you can use Invoke().
If you want to invoke a function after a delay, then repeatedly call it, use InvokeRepeating().
Example:
void Start()
{
Invoke("SayHello", 2.5f); //
InvokeRepeating("RepeatMe", 1.5f, 1.0f);
}
void SayHello(){
Debug.Log("Hello!");
}
void RepeatMe(){
Debug.Log(Time.time);
}
https://www.kindacode.com/snippet/unity-how-to-run-a-function-after-a-delay/