Timer and count down timer not working

My Timer is not working.

I am making a game tap counter and i am a beginner. I copy pasted my code to chat gpt and it says that it is fine. The timer is working good in the script but not in the game window. When i start my game and select my UI Manager (Empty Game Object which my all scripts are attached to) The timer works fine.

Can sb help me fix it?

GameManager.cs

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class GameManager : MonoBehaviour
{
    public GameplayUI gameplayUI;
    public int TapCount;
    public float DefaultTimerValue = 30f;
    public float Timer;
    public bool TimerHasEnded = false;
    public bool HasWon;
    public int TargetCount;
    public static int HighScore;
    public float CountDownTimer;
    public bool CountDownTimerHasEnded;

    // Start is called before the first frame update
    void Start()
    { 
        CountDownTimerHasEnded = false;
        CountDownTimer = 3;
            Timer = DefaultTimerValue;
        GetHighScore();
    }

    void Update()
    {
        if (CountDownTimerHasEnded)
        {
            CountDownTimer -= Time.deltaTime;
            Debug.Log("CountDownTimer: " + CountDownTimer);
            if (CountDownTimer <= 0)
            {
                CountDownTimerHasEnded = true;

            }
        }

            if (!TimerHasEnded && CountDownTimerHasEnded)
        {
            Timer -= Time.deltaTime;
            gameplayUI.UpdateTimerText(Timer);
            Debug.Log("Timer: " + Timer);

            if (Timer <= 0)
            {
                TimerHasEnded = true;
                HasWon = TapCount > TargetCount;

               // Debug.Log("Timer has ended: " + TimerHasEnded);
                gameplayUI.ShowGameOverOrWinPanel();
            }
                // game has ended !!!
                if (TapCount > HighScore)
                {
                    HighScore = TapCount;
                    SaveHighScore();
                }
            
            if (!gameplayUI.IsPaused && Input.GetMouseButtonDown(0))
            {
                TapCount++;
                gameplayUI.UpdateTapCountText(TapCount);
              //  Debug.Log("Mouse Button Detected: " + TapCount);
            }
        }

        
    }
   

    public void SaveHighScore()
    {
        PlayerPrefs.SetInt("HighScore", HighScore);
       
    }
    public void GetHighScore()
    {
        HighScore = PlayerPrefs.GetInt("HighScore");
    }                                                                                                                                       

GameplayUI.cs

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class GameplayUI : MonoBehaviour
{
    public GameManager gameManager;
    public Text TapCountText;
    public Text TimerText;
    public GameObject GameOverPanel;
    public GameObject WinScreen;
    public Text HighScoreText;
    public GameObject PausePanel;
    public bool IsPaused;
    public Text CountDownTimerText;
   
    // Start is called before the first frame update
    void Start()
    {
        UpdateTapCountText(0);
        UpdateTimerText(gameManager.DefaultTimerValue);
       IsPaused = false;
    }

    void update()
    {
        CountDownTimerText.text = gameManager.CountDownTimer.ToString("F0");
    }
   
    public void BackBtnClicked()
    {
        SceneManager.LoadScene(0);
    }

    public void UpdateTapCountText(int tapCount)
    {
        TapCountText.text = tapCount.ToString();
    }

    public void UpdateTimerText(float timer)
    {
        TimerText.text = "Timer: "+ timer.ToString("F2");
    }

    public void ShowGameOverOrWinPanel()
    {
        if (gameManager.HasWon)
        {
            WinScreen.SetActive(true);
            HighScoreText.text = "High Score: " + GameManager.HighScore.ToString();
        }
        else
        {
            GameOverPanel.SetActive(true);
            HighScoreText.text = "High Score: " + GameManager.HighScore.ToString();
        }
       
    }
    public void RestartButton()
    {
        SceneManager.LoadScene(1);
    }

    public void MainMenuBtn()
    {
        gameManager.Timer = gameManager.DefaultTimerValue;
        Time.timeScale = 1;
        SceneManager.LoadScene(0);
    }

    public void PauseBtn()
    {
        IsPaused = true;
        Time.timeScale = 0;
        PausePanel.SetActive(true);
    }
    public void ResumeBtn()
    {
        IsPaused = false;
        Time.timeScale = 1;
        PausePanel.SetActive(false);
    }

}
}

My timer is fixed i deleted it and again make it but the countdown timer is not working anyway