Many folks think that the 7 days of creation week are an elaboration on
Gen 1:1 In the beginning God created the heaven and the earth.
They think that creating light on Day 1 etc. is explaining how in the beginning God did His creating.
And that is where they go so wrong IMHO.
In the beginning God did create the heaven and the earth. But in none of the days 1-6 is there any day on which God creates earth. Day 2 onwards assumes there is water and earth to manipulate already present. Take for instance Gen 1:9 "And God said, Let the waters under the heaven be gathered together unto one place, and let the dry
landappear: and it was so."
Here God is not making land for the first time, but God is instead gathering water together so that the land which is already present can appear. Thus proving in the beginning God had already created the heavens and the earth but only in Gen 1:9 does the earth rise above the seas.
When one accepts that Gen 1:1 precedes in time the 7 days of creation week, then Gen 1:1 can occur at any time, including 13.5 billion years before Gen 1:3 or Day 1 of Recreation week.
Thus Science provides truth, and the Bible provides truth. The Bible was never intended to teach us science, just as science textbooks don't pretend to teach theology.
Case in point. Science tells us that earth is 4.5 billion years old, and that the universe is 13.5 billion years old.
Thus it is poor theology to say "In THE beginning God created the heaven and the earth" because the beginning of earth was 4.5 billion years ago and the beginning of the universe was 13.5 billion years ago. Thus there are clearly at least two different beginnings, one for the universe, and one for the earth.
And when one checks out the original Hebrew we see that this is a mistranslation to say "In THE beginning..."
There is no definite article "the" in Gen 1:1. What it should read is more to the effect "To begin, Gods (pl) created the heavens (pl) and the earth."
The whole focus and point of the author was to emphasise the fact that Gods (pl) made everything. But it is not saying all at one time.