You have to first put humans into context.
Humans recorded their history orally through stories. Stories were used to pass down information on families, regions and humans in general through generation after generation.
Stories were used to educate people and warn of dangers.
The bible, and other holy books from that time are a collection of such fables. An effort to collect together stories to educate people on how they might live a better life.
It’s not a factual history text.