My update function doesn't seem to be working...

Im making a fps game at the moment, but my code is saying that the Update void isn’t working. Any help?

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

public class Shoot : MonoBehaviour
{
public bool isReloading;

private void Update()
{
    if (Input.GetMouseButton(0) && isReloading == false)
    {
        isReloading = true;

        yield return new WaitForSeconds(1);

        isReloading = false;
    }
}
    
}

note that the Update in the void is underlined.

Are you using Coroutines?, because that’s how it’s done :

 if (Input.GetMouseButton(0) && isReloading == false)
     {
         StartCoroutine(Reloading());
     }

    IEnumerator Reloading(){


        isReloading = true;
         yield return new WaitForSeconds(1f);
         isReloading = false;
}