When spontaneous generation was a legit theory for the creation of things there were many experiments to prove the theory true or false. For example one scientist had the idea to place a dirty shirt and a few rice grains in a pot and wait. After three weeks there were mice on and around the shirt. Since there was no lid on the pot the mice were free to come and go from other places as the pleased.
There are many ways to prove the theory of spontaneous generation wrong but there are very few or none that prove it correct. There was one experiment where three jars were filled with food. One was covered, one had a cover with holes and the other was left uncovered. After a few days there were flies in the container without a cover and flies on top of the jar with holes poked in the cover, but there were no fillies around the completely covered one. This proved that the flies were not just spontainously generating but were being produced by other flies.
Due to these experiments the amount of people who still believe in spontaneous generation is very small. The rat and fly experiment both prove that there is no such thing as spontaneous generation and the only way for things to reproduce is asexually or sexually. The ability to reproduce is what creates the generations after us, and without it we would become obsolete.