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:5:101

O you who have believed, do not ask about things which, if they are shown to you, will distress you. But if you ask about them while the Qur'an is being revealed, they will be shown to you. Allah has pardoned that which is past; and Allah is Forgiving and Forbearing.  

The following was revealed when they began to ask the Prophet (s) too many questions: O you who believe, do not ask about things which, if disclosed to you, ˹if˺ revealed, would trouble you, because of the hardship that would ensue from them; yet if you ask about them while the Qur’ān is being revealed, during the time of the Prophet (s), they will be disclosed to you: meaning that if you ask about certain things during his lifetime, the Qur’ān will reveal them, but once these things are disclosed, it will grieve you. So do not ask about them; indeed: God has pardoned those things, you asked about, so do not ask again; for God is Forgiving, Forbearing.
القرآن:٥:١٠١

يَا أَيُّهَا الَّذِينَ آمَنُوا لَا تَسْأَلُوا عَنْ أَشْيَاءَ إِنْ تُبْدَ لَكُمْ تَسُؤْكُمْ وَإِنْ تَسْأَلُوا عَنْهَا حِينَ يُنَزَّلُ الْقُرْآنُ تُبْدَ لَكُمْ عَفَا اللَّهُ عَنْهَا ۗ وَاللَّهُ غَفُورٌ حَلِيمٌ  

ونزل لما أكثروا سؤاله صلىالله عليه وسلم {يا أيها الذين آمنوا لا تسألوا عن أشياء إن تُبدَ} تظهر {لكم تسؤكم} لما فيها من المشقة {وإن تسألوا عنها حين ينزَّل القرآن} في زمن النبي صلىالله عليه وسلم {تُبدَ لكم} المعنى إذا سألتم عن أشياء في زمنه ينزل القرآن بإبدائها ومتى أبداها ساءتكم فلا تسألوا عنها قد {عفا الله عنها} من مسألتكم فلا تعودوا {والله غفور رحيم}.