I think it’s important not to confuse myth with fairy tales. A myth can be true – but it is a story designed to explain a deeper truth.
For example:
A child asks her parents “how did I get here?” At age 5 or 6, the parent might respond with a myth: Mummy and Daddy love each other so much that our love needed somewhere to go, so God sent you to us so that we could love you too".
The answer is TRUE, it’s just not scientifically accurate, and it explains something else. When the child is older and asks the question, then you might give her a more scientifically accurate explanation of sex and childbirth. It’s a myth (not a good one, I admit!

)
The myth teaches truth: parents love each other, new life comes from parents’ love, God is involved in process – and in fact makes the final decision; child is loved.
A fairy tale is a bit different it’s told to amuse or to hide the truth, not to reveal the truth. Maybe the cabbage leaf or the stork is a fairy tale.
But neither the myth nor the fairy tale teaches about sex or childbirth – i.e., the “literal” scientific historic answer.
To me, Genesis is like that. The stories were written after Israel was a nation, but had been sent into exile. The writers were trying to remind the people of God to STAY people of God while in exile in Babylon (which is why so many of the Genesis stories are similar to Babylonian ones – the authors wanted to make sure that the people knew that God could compete, was better than the Babylonian “gods”).
I think God inspired those writers to put down on paper all the traditional myths (teaching stories) of the people so that they didn’t forget how their relationship with God began and developed. Being in Babylon, they were tempted to follow the Babylonian beliefs, and the sacred authors needed to keep them believing so that the belief in the One God didn’t fade.
The “truth” isn’t about how long it took or that there was a big bang or evolution, the “truth” is that God created the world, and can destroy it if he wants to, but has promised not to. Of all things created, humans are most like God. God loves us and wants a relationship with us, and will chase us down to get one!!
Lots of parts of Genesis are poetic. That’s how you remember long oral stories, with rhythm and rhyme and repetition. And I would guess that some of these stories were told around the fire in the evenings before they were ever written down.
What would be the point of God inspiring an author to write a science book? Or a history book? We figured that stuff out on our own, eventually.
But creation myths that teach us how much God loved us, and WHY our world was created, and how valuable it all is — those we needed to be told. The stories that kept a people in exile faithful to their God – those we needed to learn.
Just a thought.