No it doesn’t teach the earth is flat but the ancient inspired author believed the earth was flat...just draw a picture of each day...stars are lights in the sky etc
I think you are reinterpreting based on what you think peasants and unlearned folks down thru history have all colloquially thought and were taught. I don’t get any clue from the literal readings of Genesis that Moses(who wrote Genesis) thought the world was flat at all. Moses spent 40 days on Sinai in the burning presence of God.