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:6:30

If you could but see when they will be made to stand before their Lord. He will say, "Is this not the truth?" They will say, "Yes, by our Lord." He will ˹then˺ say, "So taste the punishment because you used to disbelieve."  

If you could see when they are made to stand, ˹when they are˺ presented, before their Lord, you would certainly see an awesome thing! He will say, to them, by the tongue of the angels, in rebuke: ‘Is this, resurrection and reckoning, not the truth?’ They will say, ‘Yes indeed, by our Lord’, it is the truth! He will say, ‘Then taste the chastisement because you disbelieved’, during life on earth.
القرآن:٦:٣٠

وَلَوْ تَرَىٰ إِذْ وُقِفُوا عَلَىٰ رَبِّهِمْ ۚ قَالَ أَلَيْسَ هَٰذَا بِالْحَقِّ ۚ قَالُوا بَلَىٰ وَرَبِّنَا ۚ قَالَ فَذُوقُوا الْعَذَابَ بِمَا كُنْتُمْ تَكْفُرُونَ  

{ولو ترى إذ وقفوا} عرضوا {على ربِّهم} لرأيت أمرا عظيما {قال} لهم على لسان الملائكة توبيخا {أليس هذا} البعث والحساب {بالحق قالوا بلى وربِّنا} إنه لحق {قال فذوقوا العذاب بما كنتم تكفرون} به في الدنيا.

See similar narrations below:

Collected by Qurʾān
quran:46:34

And the Day those who disbelieved are exposed to the Fire ˹it will be said˺, "Is this not the truth?" They will say, "Yes, by our Lord." He will say, "Then taste the punishment because you used to disbelieve."  

And on the day when those who disbelieve are exposed to the Fire, when they are being chastised in it, it will be said to them: ‘Is not this, chastisement, the truth?’ They will say, ‘Yes, by our Lord!’ He will say, ‘Then taste the chastisement for what you used to disbelieve ˹in˺’.
القرآن:٤٦:٣٤

وَيَوْمَ يُعْرَضُ الَّذِينَ كَفَرُوا عَلَى النَّارِ أَلَيْسَ هَٰذَا بِالْحَقِّ ۖ قَالُوا بَلَىٰ وَرَبِّنَا ۚ قَالَ فَذُوقُوا الْعَذَابَ بِمَا كُنْتُمْ تَكْفُرُونَ  

{ويوم يعرض الذين كفروا على النار} بأن يعذبوا بها يقال لهم {أليس هذا} التعذيب {بالحق قالوا بلى وربنا قال فذوقوا العذاب بما كنتم تكفرون}.