The same book says earth is flat like carpet
that doesn't mean that the earth is literally flat. Allah tells is in the Quran not to take everything literal and that most are ambiguous. Quran (71:19) "And Allah has made the Earth for you spread out as a carpet spread out". The proofs of other Quranic and verses and hadiths tell us that the Earth is round and not flat but that the Earth is so big that it looks flat to us. The verse indicates that it is spread out and shaped so that people can feel settled in it and be able to live and prosper in it.