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:53:31

And to Allah belongs whatever is in the heavens and whatever is in the earth - that He may recompense those who do evil with ˹the penalty of˺ what they have done and recompense those who do good with the best ˹reward˺ -  

And to God belongs whatever is in the heavens and whatever is in the earth, that is, He owns ˹all of˺ that, among which ˹also˺ are the misguided one and the ˹rightly˺ guided one, leading astray whomever He will and guiding whomever He will, that He may requite those who do evil for what they have done, by way of idolatry and otherwise, and reward those who are virtuous, by ˹their˺ affirmation of ˹God’s˺ Oneness and other acts of obedience, with the best ˹reward˺, namely, Paradise. He points out ‘the virtuous’ as being:
القرآن:٥٣:٣١

وَلِلَّهِ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ لِيَجْزِيَ الَّذِينَ أَسَاءُوا بِمَا عَمِلُوا وَيَجْزِيَ الَّذِينَ أَحْسَنُوا بِالْحُسْنَى  

{ولله ما في السماوات وما في الأرض} هو مالك لذلك، ومنه الضال والمهتدي يُضل من يشاء ويهدي من يشاء {ليجزي الذين أساءوا بما عملوا} من الشرك وغيره {ويجزي الذين أحسنوا} بالتوحيد وغيره من الطاعات {بالحسنى} الجنة وبيَّن المحسنين بقوله.