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:17:19

But whoever desires the Hereafter and exerts the effort due to it while he is a believer - it is those whose effort is ever appreciated ˹by Allah˺.  

And whoever desires the Hereafter and strives for it with the necessary effort, ˹that is˺ he performs the deeds worthy of it, being a believer (wa-huwa mu’minun is a circumstantial qualifier) — for such their effort will find favour, with God, that is, ˹their effort will be˺ accepted and rewarded.
القرآن:١٧:١٩

وَمَنْ أَرَادَ الْآخِرَةَ وَسَعَىٰ لَهَا سَعْيَهَا وَهُوَ مُؤْمِنٌ فَأُولَٰئِكَ كَانَ سَعْيُهُمْ مَشْكُورًا  

{ومن أراد الآخرة وسعى لها سعيها} عمل عملها اللائق بها {وهو مؤمن} حال {فأولئك كان سعيهم مشكورا} عند الله أي مقبولاً مثابا عليه.