I want to spawn a shell every frame as long as mouse button is down

if (Input.GetMouseButtonDown(0) && semi == true)
{
if (ammo != 0)
{
if (fireWait == false && reloading == false)
{
shell = Instantiate(shell, shellSpit.position, shellSpit.rotation);
Shoot();
ammo -= 1;
}
}
}

Take this and put it inside a Void FixedUpdate() to update every frame. Should look like this:

void FixedUpdate()
{
    if (Input.GetMouseButtonDown(0) && semi == true)
     {
         if (ammo != 0)
         {
             if (fireWait == false && reloading == false)
             {
                 shell = Instantiate(shell, shellSpit.position, shellSpit.rotation);
                 Shoot();
                 ammo -= 1;
            }
         }
     }
}