Explained in detail
Fussilat فصلت Surah 41, Ayah 46
مَّنْ عَمِلَ صَـٰلِحًا فَلِنَفْسِهِۦ ۖ وَمَنْ أَسَآءَ فَعَلَيْهَا ۗ وَمَا رَبُّكَ بِظَلَّـٰمٍ لِّلْعَبِيدِ
Whoever acts righteously does so for himself; and whoever works evil does so against himself. Your Lord is not unjust to the servants.
Arabic: Tanzil Project. Translation: Talal Itani, ClearQuran.com (CC BY-ND 4.0).