At-Tur 52:21
وَٱلَّذِينَ ءَامَنُوا۟ وَٱتَّبَعَتْهُمْ ذُرِّيَّتُهُم بِإِيمَـٰنٍ أَلْحَقْنَا بِهِمْ ذُرِّيَّتَهُمْ وَمَآ أَلَتْنَـٰهُم مِّنْ عَمَلِهِم مِّن شَىْءٍ ۚ كُلُّ ٱمْرِئٍۭ بِمَا كَسَبَ رَهِينٌ
Wallatheena amanoo wattabaAAat-humthurriyyatuhum bi-eemanin alhaqnabihim thurriyyatahum wama alatnahum minAAamalihim min shay-in kullu imri-in bima kasaba raheen
And those who believed and whose descendants followed them in faith - We will join with them their descendants, and We will not deprive them of anything of their deeds. Every person, for what he earned, is retained.
And those who believed and their children followed them in belief, We will join their children with them, and will not curtail (the reward of) any of their deeds at all. Every person will be pledged for what he earned.