gnats.. they come with teh soil/ medium. You water -> they grow.
A wet-dry cycle helps, if properlly allowing top layer to dry, but is not fool-proof.
Bti is the way to go. The first month or so apply a top dress of "Mosquito Bits" or similar every 2-3 weeks. If confident there are no larva in your substrate, you can cease using it.
I use it preemptively every time. Also after a transplant, as that's more unused substrate getting wet for the "first" time. You'll never see more than 1-2 gnats throughout the grow at any one time. it's super effective, which is rare when it comes to fighting off pests and pathogens. Basically anythign that has a larva cycle in the substrate will not survive this bacteria. It is 100% safe. it's been used on the food you eat for the last century or more.
do keep the yellow traps up... killing from both ends of life cycle will help end the problem sooner. 2-3 weeks shoudl be cleared up after starting to use Bti. during a problem, i'd top dress 1/week, but preemptively using the product, once per 2-3 weeks is sufficient.
if that brand for "mosquito bits" is not in your area, anythign with teh same bacteria will work.. i'll mangle the spelling but you'll recognize it if you see it -- Baciullus Thurgingensis or wathever... - "israelis" subspecies is the "i". "Bti" for short. Googling can verfiy everything i've said.
No worries.. marketed to kill mosquitos, but definiteyl works on gnats too.. shoudl kill just about all larva in soil that you'll encounter.