In the beginning, 6000 years ago or 12.5 billion years ago, God creates the universe from nothing and then he relates to the writer of Genesis that He made the following on their respective days:
Many doubters get hung up on the sun and moon and stars being made or placed on the fourth day. How is it that plants can grow without the sun? How could the Earth be made before the sun? It just isn't conventional science. If one had to come up with a speculative explanation, one could suppose that this story was being recounted by Moses who actually experienced the entire creation from a physical perspective of standing on earth and seeing the process over a six-day period. Sort of a virtual reality experience. If in fact the early earth had a cloud of water surrounding it, then perhaps the heavenly lights would not even be visible until his fourth day. And though the process could have taken millions of years, his experience lasted just six days. In fact, though, I do not have to understand the how or when these things happened. All I have to know is that God did it and that my belief in God does not rest on my having a perfect understanding of the science of creation. Even in my ignorance, my salvation is assured.