Reading these as "creation myths" is a mistake. Many scholars acknowledge that one or both of these are actually songs or poems honoring creation, not accountings of what happened.
My understanding is that the first one is often more likely considered a "work of art" and that it's possible the second one was considered divine revelation.
This was generally understood by biblical scholars and theologians, but becamame messed up in the 1700-1800's when a new fundamentalism arose and began to take things literally that weren't meant to be out of ignorance for Jewish storytelling and culture.