This isn’t defending the present-day political view called Creationism which asserts that the Bible says that the universe and living things were created in 24-hour days a few thousand years ago, but you should know that, in fairness to the Bible record, the Bible clearly allows an indefinite amount of time for the creation of the universe in its opening words in Genesis 1:1, "In [the] beginning God created the heavens and the earth. " This is in harmony with science. the Andromeda galaxy has been measured at about 2,000,000 light years from earth. That means that either the light we see from it has been travelling for two million years, or that God deliberately created the universe in a deceptive manner to make it appear so, which is unreasonable and accuses God of deception. Also, the remains of the decay of radioactive elements in some beds of rock indicate that they have lain undisturbed for billions of years. Genesis 1:1 allows for this.
In verse two, if plainly says that 'darkness' was over the earth, not the universe or heavens, since the stars were created in verse 1, possibly taking billions of years.
The following four "days" do not use the Hebrew word for "create", but "make", and apparently deal with the clearing of a cloud cover, 'making' first diffused light, then sun, moon and stars appear in the "heavens," that is, the sky, (Matthew 6:26; 2 Chronicles 2:6). To this day most of the planets have cloud covers. And Gen. 2:4 clearly shows that the "days" were not the 24-hour variety, calling all seven "days" ONE "day".
So Gen. 1:1 covers the formation of the visible universe, including the sun, earth, moon and stars, when it says, "In the beginning God created the heavens and the earth." The creative "days" all cover the detail of the preparation of the earth for human habitation.
The Bible is getting a bad rap.
Best regards,
Michael