Ok thanks Test Account. I still learn towards worms but I'll admit if it looked like the larva in this https://diptera.info/forum/viewthread.php?thread_id=1426 I could see how they could be mistaken especially if you don't get a great look. I'll see what I can do about a picture if it happens again.
I stir the things I sterilize by microwaving, but something could've got in on food. Also if were gnats, they can easily get past the window screen.