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

Has there not come to you the news of those who disbelieved before? So they tasted the bad consequence of their affair, and they will have a painful punishment.  

Has there not come to you, O disbelievers of Mecca, the tidings, the story, of those who disbelieved before and thus tasted the evil consequences of their conduct?, ˹they tasted˺ the punishment for disbelief in this world. And there will be for them, in the Hereafter, a painful chastisement?
القرآن:٦٤:٥

أَلَمْ يَأْتِكُمْ نَبَأُ الَّذِينَ كَفَرُوا مِنْ قَبْلُ فَذَاقُوا وَبَالَ أَمْرِهِمْ وَلَهُمْ عَذَابٌ أَلِيمٌ  

{ألم يأتكم} يا كفار مكة {نبأُ} خبر {الذين كفروا من قبل فذاقوا وبال أمرهم} عقوبة الكفر في الدنيا {ولهم} في الآخرة {عذاب أليم} مؤلم.

See similar narrations below:

Collected by Qurʾān
quran:59:15

˹Theirs is˺ like the example of those shortly before them: they tasted the bad consequence of their affair, and they will have a painful punishment.  

their likeness in relinquishing faith is, as the likeness of those who, recently before them, a short time before — these being the idolaters from among those ˹who fought˺ at Badr — tasted the evil consequences of their conduct, the punishment for it in this world, by being killed or otherwise. And for them there will be a painful chastisement, in the Hereafter.
القرآن:٥٩:١٥

كَمَثَلِ الَّذِينَ مِنْ قَبْلِهِمْ قَرِيبًا ۖ ذَاقُوا وَبَالَ أَمْرِهِمْ وَلَهُمْ عَذَابٌ أَلِيمٌ  

مثلهم في ترك الإيمان {كمثل الذين من قبلهم قريبا} بزمن قريب وهم أهل بدر من المشركين {ذاقوا وبال أمرهم} عقوبته في الدنيا من القتل وغيره {ولهم عذاب أليم} مؤلم في الآخرة.