In the first two chapters of Genesis, we learn that the world was without form and void.
What does this mean. My interpretation is that in the first day of creation everything was made from nothing. Science sees this as the big bang.
Everything was affected by a huge amount of energy. It was expanding at a terrific rate.
Somewhere on the fourth day, there was enough space between material for the stars and planets to form – including the galaxies. This is when the earth was created. There is no reason to believe the earth existed before that. The earth is only mentioned in relation to the universe being created is because that is where we are listening from.
it is quite probable that the rules of physics and chemistry existed from the start. Just that there was so much energy that material was not held by gravity.