First there were hominids.
Who knows what kind of crazy, uninformed, superstitious and half-baked ideas proto-humans and Neaderthal knuckle-draggers had?
The first human beings made the best guess they could make about the world.
What are the chances they got anything 100% just out of dumb luck?
The idea of gods is primitive superstition.
Those superstitions supplied answers to questions.
However, as human knowledge increased, there was less and less necessity to look to superstition (gods, demons, angels, spirits) as PRIME ACTORS in human drama.
When, superstition transitioned into PHILOSOPHY and then SCIENCE--at each leap forward fewer resorts to god or GOD was required.
Theology is a very lame imitation of Philosophy and Science.
The Early Church produced Saint Thomas Aquinas and Saint Augustine who ripped off the Greek philosophers Plato and Aristotle.
Pure imitation of form and approach.
Without Aquinas, the Catholic Church would hardly have had a theology or doctrines!
In the 19th century, science blossomed and technology was born and the atomic theory became more and more practical in implementation.
Chemistry abounded in discovery.
What the Scriptures represent is the STONE AGE MIND.
Scriptures and Theism are old-fashion quack medicine.
Once and awhile somebody got something right. Most of the time they were crazy as shithouse rats. But, since "God" is attributed credit--well, people cling to it.