After Allah (swt) confirmed the matter of writing the deeds and counting them for their doers, He (swt) indicated its great consequences. This matter will end in accountability and reward according to the good and evil recorded by the angels. This destiny is pre-prepared and ready waiting for its righteous companions in Paradise and the wicked in Fire.
Allah (swt) affirmed this meaning here by using the affirmation style (Using the letter “Lam” in the word لَفِي ) to stop the doubts of people who suspect this destiny.
(Righteous) is derived from (righteousness), a word that holds all good behaviours, Allah (swt) says: