The Bible’s content was written over the course of at least 500 years
If you grew up with a lot of exposure to the Bible, it might be easy to assume the authors of the books of the Bible were like modern journalists: writing things down as they happened. However, this was not the case. The Bible includes stories from the first century CE as well as stories about the beginnings of the cosmos—but most biblical scholars agree that the books we find these stories in reached their present forms between 350 BCE and 150 CE.
Of course, these books reference sources from outside that window. For example, parts of the Torah rely on oral traditions and writings that are much older than the present form of the Pentateuch, and the Song of Deborah (the fifth chapter in the book of Judges) is often referred to as one of the oldest works of Hebrew poetry in the Bible.