Worms eating my garlic scapes. How can I get rid of them?

Lap31294724
by Lap31294724
small little yellow worm are eating my garlic scypes and leaving residue that i believe are eggs.how can i get rid of them and will they get to the bulb.