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:62:8

Say, "Indeed, the death from which you flee - indeed, it will meet you. Then you will be returned to the Knower of the unseen and the witnessed, and He will inform you about what you used to do."  

Say: ‘Assuredly the death from which you flee (fa-innahu: the fā’ is extra) will indeed encounter you; then you will be returned to the Knower of the Unseen and the visible, ˹the Knower of˺ what is ˹kept˺ secret and what is in the open, and He will inform you of what you used to do’, whereat He will requite you for it.
القرآن:٦٢:٨

قُلْ إِنَّ الْمَوْتَ الَّذِي تَفِرُّونَ مِنْهُ فَإِنَّهُ مُلَاقِيكُمْ ۖ ثُمَّ تُرَدُّونَ إِلَىٰ عَالِمِ الْغَيْبِ وَالشَّهَادَةِ فَيُنَبِّئُكُمْ بِمَا كُنْتُمْ تَعْمَلُونَ  

{قل إن الموت الذي تفرون منه فإنه} الفاء زائدة {ملاقيكم ثم تردون إلى عالم الغيب والشهادة} السر والعلانية {فينبئكم بما كنتم تعملون} فيجازيكم به.

See similar narrations below:

Collected by Qurʾān
quran:9:105

And say, "Do ˹as you will˺, for Allah will see your deeds, and ˹so, will˺ His Messenger and the believers. And you will be returned to the Knower of the unseen and the witnessed, and He will inform you of what you used to do."  

And say, to them, or to people ˹in general˺: ‘Act, as you will, for God will surely see your actions, and ˹so will˺ His Messenger and the believers, and you will be returned, through resurrection, to the Knower of the unseen and the visible, that is, ˹to˺ God, and He will tell you what you used to do’, and so requite you for it.
القرآن:٩:١٠٥

وَقُلِ اعْمَلُوا فَسَيَرَى اللَّهُ عَمَلَكُمْ وَرَسُولُهُ وَالْمُؤْمِنُونَ ۖ وَسَتُرَدُّونَ إِلَىٰ عَالِمِ الْغَيْبِ وَالشَّهَادَةِ فَيُنَبِّئُكُمْ بِمَا كُنْتُمْ تَعْمَلُونَ  

{وقل} لهم أو للناس {اعملوا} ما شئتم {فسيرى الله عملكم ورسوله والمؤمنون وستردون} بالبعث {إلى عالم الغيب والشهادة} أي الله {فينبئكم بما كنتم تعملون} فيجازيكم به.