Where do Maggots come from?

This is a potato covered with soil surrounding it, the milk is on potato. This is a setup to isolate Nematodes from soil. But Sakshi got maggots on the potato.

Can we trace from where did maggots come on potato? Is it a spontaneous generation of life?