In the middle of the nineteenth century August Comte asserted with utmost confidence that science, by then, he said, essentially complete, had discredited and supplanted religion. A few years later, perhaps in part because of Comte had readied the way for the interpretation of it, Darwin’s theory of evolution was also widely understood to have discredited and supplanted religion. So the “modern” image of science as the anti-theology was established before Abraham Lincoln took office. At that time the germ theory of disease was not established.
Marilynne Robinson, “Cosmology” in When I Was a Child I Read Books (2012).