When individuals, groups, cities and nations turn away from God, He will judge them according to His righteous character and moral laws.
We know from Scripture that “the LORD is righteous, [and] He loves righteousness” (Psa 11:7), and “Righteous are You, O LORD, and upright are Your judgments” (Psa 119:137).
For God, righteousness is an attribute, an inherent quality, not the adherence to laws beyond Himself (of which there are none).
The righteousness of God may be defined as the intrinsic, immutable, moral perfection of God, from which He commands all things, in heaven and earth, and declares as good that which conforms to His righteousness and as evil that which deviates.
Righteousness and justice are related words.
The former speaks of God’s moral character, whereas the latter speaks of the actions that flow out of His character.
Whatever God’s righteousness requires, His justice executes; either to approve or reject, to bless or condemn.
God is “the Judge of all the earth” (Gen 18:25), and He “is a righteous judge, and a God who has indignation every day” (Psa 7:11).
It’s unimaginable to serve a God who cannot or will not judge sin.
To read in full, see Dr. Cook’s book: https://www.amazon.com/gp/product/B09WXT7NL3