I cant shoot the ammo when i trigger the box

Why it cant shoot the ammo? I have already put break under the condition

void Update()
{   ammo2time += Time.deltaTime;
    gameObject.transform.position += new Vector3(0, -0.02f, 0);
}

void Switch()
{
    switch (caseswitch)
    {
        case 0:
            break;

        
        case 1:
            if (ammo2time > 0.30f)
            {

                Vector3 Bullet_pos = Ship.transform.position + new Vector3(0, 0.6f, 0);

                Instantiate(ammo2, Bullet_pos, Ship.transform.rotation);

                ammo2time = 0;

            }
            
            return;

    }
}

    void OnTriggerEnter2D(Collider2D col) 
    {
        if (col.tag == "plane") 
        { 
            Destroy(gameObject); 
            caseswitch = 1;
        }

        }

    }

You do set your variable caseswitch to 1, but I can’t see if you call your method Switch(). break breaks out of your switch statement, you should use break rather than return for your 2nd case, and you need a default case.

default:

break;

Then your code should work fine.