Code freezes Unity and I don't know how to fix

I was making a very basic gun script, I don’t remember what I did to make it not work, heres the main code

 Animator m_Animator;
    public Rigidbody Bullet;
    public Transform barrelEnd;
    public float firerate = 0.5f;

    // Start is called before the first frame update
    void Start()
    {
        m_Animator = gameObject.GetComponent<Animator>();
        StartCoroutine(SpawnLoop());
    }

    IEnumerator SpawnLoop()
    {
        while (enabled)
        {
            if (Input.GetButton("Fire1"))
            {
                Rigidbody rocketInstance;
                rocketInstance = Instantiate(Bullet, barrelEnd.position, barrelEnd.rotation) as Rigidbody;
                m_Animator.SetBool("shoot", true);
                yield return new WaitForSeconds(firerate);
            }
        }
    }

    void FixedUpdate()
    {
        m_Animator.SetBool("shoot", false);
    }

Sorry for the headaches.

try this:

Animator m_Animator;
    public Rigidbody Bullet;
    public Transform barrelEnd;
    public float firerate = 0.5f;
    private bool shoot;
    // Start is called before the first frame update
    void Start()
    {
        m_Animator = gameObject.GetComponent<Animator>();
        StartCoroutine(SpawnLoop());
    }
    private void Update()
    {
        if (Input.GetButton("Fire1") && shoot == true)
        {
            StartCoroutine(SpawnLoop());
        }
    }
    IEnumerator SpawnLoop()
    {
            shoot = false;
            Rigidbody rocketInstance;
            rocketInstance = Instantiate(Bullet, barrelEnd.position, barrelEnd.rotation) as Rigidbody;
            m_Animator.SetBool("shoot", true);
            yield return new WaitForSeconds(firerate);
            shoot = true;
    }

    void FixedUpdate()
    {
        m_Animator.SetBool("shoot", false);
    }