Science gave up on the idea of spontaneous generation after Louis
Pasteur did the experiment using a bottle with a swan-neck duct.
As the idea of evolution began to be accepted, they wondered how
life started. Many continued to rely on religious myths. Many
believed that life on earth was planted from an asteroid, comet,
or alien spacecraft (the panspermia hypothesis).
If life didn’t start from unliving matter, then how did
whatever started it start?
See also in The book of science:
Readings on wikipedia: