As for the 6 day creation outlined in
Genesis 1:1-2:3, I believe that is the genealogy of the heavens and the earth which introduce "
...the history of the heavens and the earth when they were created, in the day that the LORD God made the earth and the heavens," at
Gen 2:4. It was standard literary practice of the ancient near/middle east, to introduce a narrative with a genealogy. In this case, that genealogy is the 6 days of creation.