In the name of God, the all-Compassionate, the all-Merciful
Ancient Mesopotamians/Sumerians believed in seven heavens and seven earths, the first heaven being home to all the stars. Islam also teaches seven heavens, the first being the solar system. Hence, critics infer, the seven heavens are ultimately of mythic origin.
In fact, as Qur’an 71:1-15 clearly show, the seven heavens and earths were part of the Ilm al-Ghayb (Knowledge of the Unseen) Allah revealed to Prophet Noah pbuh. This knowledge, like that of the Big Bang and the Seven Gates of Hell, was obviously inherited by post-flood humanity and became embedded/embellished in the myths of subsequent cultures.
This knowledge may have also been revealed to other prophets who were sent following the (local) Flood that wiped out humanity except Noah and his family, every nation on earth having received a messenger at some point in history (Qur’an 16:36).
And Allah knows best.