All those who would posit that the creation account is "poetic" and "not to be taken as scientifically accurate" need to remember that the Bronze Age sheepherders who read this stuff took it quite literally.
If the Bible said that God created light before he created the Sun, then by golly, he did!
If the Bible said that God created the Earth before the Sun, then by golly, he did!
If the Bible said he did it all in six days, then...well, you get the picture.
In fact, the Genesis account of creation was taken as literal by most Christians all the way until the nineteenth century! It was only when modern science proved that the creation account was bunk that religious apologists started their argument that the story is not literal.
You would think that an all-powerful God could have told the truth about the formation of the earth in a way that would not have been confusing to those ancient peoples and downright wrong to us.
CyrusThePersian