Not everything in the bible is to be taken literally.
How do we know what is to be taken literally and what isn't? Is that just up to our judgement? I don't think any of it is true, although some parts are obviously very loosely based on true events.
The bible is not concerned with Scientific Truth. The writers really didn't care how the earth was made so much as that GOD MADE IT.
Historical accuracy isn't perfect either, but they wanted to portray the Salvation truth. Most of the "historical" stories were written to prove that God Saves His People. I guess we could call that a "big theme?"
In my mind, it doesn't matter whether or not the stories are factual events. For me, they contain moral truth and understanding. And religious truth (doctorine) but the religious truth has to do with religion, and on a scientific debate, it isn't a good idea to refer to religion.
I guess it is up to your judgement. If you're atheist, that is that.
If catholic, as am I, you can refer to the Catechism.
I don't know how others differenciate. But I go by the pope. While the pope is human and not infallible, on religious matters he is protected from error. On doctrine, he's right. (The above is all IMO. I think I stated that well enough by the fact that "I go by ..." )