Check out example codes for "how to create a coutdown time in unity". It will help you in understanding the concepts better.

Code Example 1

float timeLeft = 30.0f;
     
     void Update()
     {
         timeLeft -= Time.deltaTime;
         if(timeLeft < 0)
         {
             GameOver();
         }
     }

Learn ReactJs, React Native from akashmittal.com