The righteous judgment of God

This is evidence of the righteous judgment of God, that you may be considered worthy of the kingdom of God, for which you are also suffering— since indeed God considers it just to repay with affliction those who afflict you, —2 Thessalonians 1:5-6

From David Guzik’s Commentaries on the Bible:

Many people question the righteousness of God’s judgment. They believe that God’s love and His judgment contradict each other. But God’s judgment is based on the great spiritual principle that it is a righteous thing with God to repay those who do evil. Since God is righteous, He will repay all evil, and it will all be judged and accounted for either at the cross or in hell.