Al-Anbya 21:94
فَمَن يَعْمَلْ مِنَ ٱلصَّـٰلِحَـٰتِ وَهُوَ مُؤْمِنٌ فَلَا كُفْرَانَ لِسَعْيِهِۦ وَإِنَّا لَهُۥ كَـٰتِبُونَ
Faman yaAAmal mina assalihatiwahuwa mu/minun fala kufrana lisaAAyihi wa-innalahu katiboon
So whoever does righteous deeds while he is a believer - no denial will there be for his effort, and indeed We [i.e., Our angels], of it, are recorders.
So, whoever does righteous deeds, while he is a believer, his effort will not be rejected, and We are to put it on record.