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:7:147

Those who denied Our signs and the meeting of the Hereafter - their deeds have become worthless. Are they recompensed except for what they used to do?  

Those who deny Our signs and the encounter in the Hereafter, the Resurrection and so on. their works, the good deeds they performed in the world, such as the maintenance of kinship ties or voluntary almsgivings, have failed, are invalid, and will not be rewarded, since they are not binding ˹in this case˺. Shall they, they shall not, be requited anything but, the requital ˹for˺, what they used to do?’, in the way of denial and acts of disobedience?
القرآن:٧:١٤٧

وَالَّذِينَ كَذَّبُوا بِآيَاتِنَا وَلِقَاءِ الْآخِرَةِ حَبِطَتْ أَعْمَالُهُمْ ۚ هَلْ يُجْزَوْنَ إِلَّا مَا كَانُوا يَعْمَلُونَ  

{والذين كذبوا بآياتنا ولقاء الآخرة} البعث وغيره {حبطت} بطَلَت {أعمالهم} ما عملوه في الدنيا من خير كصلة رحم وصدقة فلا ثواب لهم لعدم شرطه {هل} ما {يُجزون إلا} جزاء {ما كانوا يعملون} من التكذيب والمعاصي.