Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:29

It is He who created for you all of that which is on the earth. Then He directed Himself to the heaven, ˹His being above all creation˺, and made them seven heavens, and He is Knowing of all things.  

He it is Who created for you all that is in the earth, that is, the earth and all that is in it, so that you may benefit from and learn lessons from it; then, after creating the earth, He turned to, that is, He made His object, heaven and levelled them (fa-sawwāhunna: the pronoun ˹-hunna˺ refers to ‘heaven’, since, it ˹heaven˺ is implicit in the import of the sentence attributed to it ˹the pronoun˺), that is to say, He made them thus, as ˹He says˺ in another verse, ˹fa-qadāhunna˺ so He determined them ˹Q. 41:12˺) seven heavens and He has knowledge of all things, in their totality and in their individual detail, so do you not then think that the One who has the power to create this to begin with, which is much greater than what you are, also has the power to bring you back ˹after death˺?
القرآن:٢:٢٩

هُوَ الَّذِي خَلَقَ لَكُمْ مَا فِي الْأَرْضِ جَمِيعًا ثُمَّ اسْتَوَىٰ إِلَى السَّمَاءِ فَسَوَّاهُنَّ سَبْعَ سَمَاوَاتٍ ۚ وَهُوَ بِكُلِّ شَيْءٍ عَلِيمٌ  

{هو الذي خلق لكم ما في الأرض} أي الأرض وما فيها {جميعاً} لتنتفعوا به وتعتبروا {ثم استوى} بعد خلق الأرض أي قصد {إلى السماء فسواهن} الضمير يرجع إلى السماء لأنها في معنى الجمع الآيلة إليه: أي صيَّرها كما في آية أخرى (فقضاهن) {سبع سماوات وهو بكل شيء عليم} مجملا ومفصلا أفلا تعتبرون أن القادر على خلق ذلك ابتداءً وهو أعظم منكم قادر على إعادتكم.