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:38:27

And We did not create the heaven and the earth and that between them aimlessly. That is the assumption of those who disbelieve, so woe to those who disbelieve from the Fire.  

And We did not create the heavens and the earth and all that is between them in vain, frivolously. That, namely, the creation of what has been mentioned as being for no ˹particular˺ purpose, is the supposition of those who disbelieve, from among the people of Mecca. So woe — a valley ˹in hell-fire˺ — to the disbelievers from the Fire!
القرآن:٣٨:٢٧

وَمَا خَلَقْنَا السَّمَاءَ وَالْأَرْضَ وَمَا بَيْنَهُمَا بَاطِلًا ۚ ذَٰلِكَ ظَنُّ الَّذِينَ كَفَرُوا ۚ فَوَيْلٌ لِلَّذِينَ كَفَرُوا مِنَ النَّارِ  

{وما خلقنا السماء والأرض وما بينهما باطلا} عبثا {ذلك} أي خلق ما ذكر لا لشيء {ظن الذين كفروا} من أهل مكة {فويل} وادِ {للذين كفروا من النار}.