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:51:16

Accepting what their Lord has given them. Indeed, they were before that doers of good.  

receiving (ākhidhīna is a circumstantial qualifier referring to the person of the predicate of inna, ‘truly’) what their Lord has given them, of reward, for indeed formerly, ˹before˺ their entering Paradise, they had been virtuous, in the world.
القرآن:٥١:١٦

آخِذِينَ مَا آتَاهُمْ رَبُّهُمْ ۚ إِنَّهُمْ كَانُوا قَبْلَ ذَٰلِكَ مُحْسِنِينَ  

{آخذين} حال من الضمير في خبر إن {ما آتاهم} أعطاهم {ربهم} من الثواب {إنهم كانوا قبل ذلك} أي دخولهم الجنة {محسنين} في الدنيا.