Both holiness and righteousness are used to describe God. Additionally, we as Christians are called to be holy and righteous as well. These are two distinct words, so they must have distinct meanings.
So, my question is what distinguishes holiness from righteousness?
You shall be holy to me, for I the Lord am holy and have separated you from the peoples, that you should be mine. Leviticus 20:26 ESV
14 As obedient children, do not be conformed to the passions of your former ignorance, 15 but as he who called you is holy, you also be holy in all your conduct, 16 since it is written, “You shall be holy, for I am holy.” 1 Peter 1:14-16 ESV
You are witnesses, and God also, how holy and righteous and blameless was our conduct toward you believers. 1 Thessalonians 2:10 ESV
But that is not the way you learned Christ!— 21 assuming that you have heard about him and were taught in him, as the truth is in Jesus, 22 to put off your old self,[f] which belongs to your former manner of life and is corrupt through deceitful desires, 23 and to be renewed in the spirit of your minds, 24 and to put on the new self, created after the likeness of God in true righteousness and holiness. Ephesians 4:20-24 ESV