Making and Enemy Stop and Shoot

Hello guys. I want to make my enemy randomly stop and shoot.

            public int chanceStopping;
    
                 chanceStopping = Random.Range (0, 300);
    
                 if (chanceStopping == 150) {
             StopnShoot ();
         }
    
    
        void StopnShoot (){ //Make the enemy stop for 1 second and shoot twice. 
        }

How can I do this. I need some help.

public float MinTime = 2.0f;
public float MaxTime = 5.0f;
public float TimeStopped = 1.0f;

private void Start()
{
    StartCoroutine(UpdateEnemy());
}

private IEnumerator UpdateEnemy()
{
    float time = Random.Range(MinTime, MaxTime);
    while(time > 0)
    {
        time -= Time.deltaTime;
        yield return null;
    }
    Stop();
    yield return new WaitForSeconds(TimeStopped);
    StartCoroutine(UpdateEnemy());
}

Have fun!