It’s a common ‘tignola’ of garlic.
The little caterpillar is yellow, 7-9 mm long and it erodes the inner leaves till to the bulb, so the plant goes rotten.
Its cycle starts in spring when caterpillars dig tunnels along leaves till to become adults and exit from garli after about 4-5 weeks from egg deposition. Theri cycle may repeat 5-6 times a season.
To fight this fly is important to interrupt the egg putting down in the end of winter by repellent means, such as natural pyrethrum.