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:39:50

Those before them had already said it, but they were not availed by what they used to earn.  

Already the same was said by those who were before them, of communities, such as Korah and those of his people who were content with such ˹a saying˺. But what they used to earn did not avail them.
القرآن:٣٩:٥٠

قَدْ قَالَهَا الَّذِينَ مِنْ قَبْلِهِمْ فَمَا أَغْنَىٰ عَنْهُمْ مَا كَانُوا يَكْسِبُونَ  

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

See similar narrations below:

Collected by Qurʾān
quran:15:84

So nothing availed them ˹from˺ what they used to earn.  

And so that which they used to count as gain, in the way of building fortresses and amassing riches, did not avail, ˹did not˺ protect, them, from the chastisement.
القرآن:١٥:٨٤

فَمَا أَغْنَىٰ عَنْهُمْ مَا كَانُوا يَكْسِبُونَ  

{فما أغنى} دفع {عنهم} العذاب {ما كانوا يكسبون} من بناء الحصون وجمع الأموال.