Got it ... when Genesis says The Lord God created the world in 6 days its allegory. When the same thing is said in Exodus in the context of the Ten Commandments its to be taken literally.
Learn to distinguish between moral commandments on the one hand, and descriptions of how the universe/world were created on the other. The Bible is primarily about morality, not science or history.
While morality isn’t always dirt simple, things like “don’t worship other gods” and “don’t make graven images of Me” and “don’t commit adultery” and “don’t steal” are pretty simple - you know those things when you see them. The creation of the universe is anything but simple, but it still needed to be described in some fashion, and we needed to be reminded about it every once in a while, in order to establish the authority of G-d to give commandments to us (”Hey, you puny humans, I created everything, including your ancestors. I own this planet and you, and I can tell you what, when and where to do whatever I’d like to - and you’ll listen, or else”). There is really no other purpose to describing the Creation in the Bible. Again, it isn’t a science book, its about morality.