The Bible generally explains spiritual truths, WHY not HOW.  St. Augustine (354-450 AD)  himself warned against a literal interpretation of Genesis.  And by the way, the Church never officially taught the earth was flat either because it supported the ancient Greek view that the earth was spherical until the science developed our current understanding of our planet in relation to other planets in our solar system that orbit around the sun in a galaxy that is created in relation to other galaxies that together make up a static, expanding or collapsing universe, depending on your point of view.