Surah Al-Isra 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 Allāh].
Translation: Saheeh International
Tafsir
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.
Excerpt from Tafsir al-Jalalayn, commentary on 17:19, via Quran.com. The reader has the full commentary and 9 more tafsirs.