There are already establisged documentaries about the physical/chemical/biological creation of and on the Earth.
Whether God " created it in 7 days" or not is debatable. There is no knowing how long a day is for such a large mythological being.
Want to know the answer? Go look up video documentaries. There was a correct answer in the first page about gravity, chemicals, etc etc.