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:11:7

And it is He who created the heavens and the earth in six days - and His Throne had been upon water - that He might test you as to which of you is best in deed. But if you say, "Indeed, you are resurrected after death," those who disbelieve will surely say, "This is not but obvious magic."  

And He it is Who created the heavens and the earth in six days, the first of which was Sunday and the last, Friday — and His Throne, before creating them, was upon the water, borne by the winds — that He might try you (li-yabluwakum is semantically connected to khalaqa, ‘He ˹Who˺ created’), in other words, He created them and all that is beneficial and good for you in them, in order to test you: which of you is best in conduct, that is, ˹which of you˺ is most obedient to God. And if you were to say, O Muhammad (s), to them: ‘Truly you shall be raised again after death’, those who disbelieve will say, ‘This, Qur’ān that speaks of resurrection — or, ˹this˺ that you are saying — is nothing but manifest, clear, sorcery’ (sihrun: a variant reading has sāhirun, ‘sorcerer’, in which case the reference is to the Prophet (s).
القرآن:١١:٧

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

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