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

But those who disbelieved - their deeds are like a mirage in a lowland which a thirsty one thinks is water until, when he comes to it, he finds it is nothing but finds Allah before Him, and He will pay him in full his due; and Allah is swift in account.  

And as for those who disbelieve, their works are like a mirage in a plain (qī‘a is the plural of qā‘, that is to say, fulāt, ‘an open space’). ˹A mirage is˺ a kind of radiation which one might observe therein at midday during extreme heat, resembling running water — which the thirsty man supposes to be water until he comes to it and finds it to be nothing, like what he had supposed. Likewise is ˹the case of˺ the disbeliever who supposes that his deeds, such as some voluntary alms, will benefit him; but when he dies and comes before his Lord he will not find his deed, in other words, it will be of no benefit to him; and he finds God there, namely, in the place of his deeds, Who pays him his account in full, that is, He requites him for it in this world; and God is swift at reckoning, that is, at requiting.
القرآن:٢٤:٣٩

وَالَّذِينَ كَفَرُوا أَعْمَالُهُمْ كَسَرَابٍ بِقِيعَةٍ يَحْسَبُهُ الظَّمْآنُ مَاءً حَتَّىٰ إِذَا جَاءَهُ لَمْ يَجِدْهُ شَيْئًا وَوَجَدَ اللَّهَ عِنْدَهُ فَوَفَّاهُ حِسَابَهُ ۗ وَاللَّهُ سَرِيعُ الْحِسَابِ  

{والذين كفروا أعمالهم كسراب بقيعةِ} جمع قاع: أي فيلاه وهو شعاع يرى فيها نصف النهار في شدة الحر يشبه الماء الجاري {يحسبه} يظنه {الظمآن} أي العطشان {ماءً حتى إذا جاءه لم يجده شيئا} مما حسبه كذلك الكافر يحسب أن عمله كصدقه ينفعه حتى إذا مات وقدم على ربه لم يجد عمله أي لم ينفعه {ووجد الله عنده} أي عند عمله {فوفَّاه حسابه} أي جازاه عليه في الدنيا {والله سريع الحساب} أي المجازاة.