Ah, I see your mistake. You appear to be treating genesis as history. This is an error made by many Christians, including myself when I was younger. You see, god was here for all of the universe's creation. I believe he is the one who orchestrated the big bang, but humans in ancient times would understand complex topics such as rapid universal expansion, or planetary creation. Instead, he created the much simpler tale of the world being created in 7 days, as to give the humans an understanding of what he did. His tale does actually line up with the order in which things were created. (i.e light was the stars, which came first) You see, science explains who the things we live with work, but the Bible gives us our reason to live.