The law, refers to the broad spectrum of truth. The commandment refers to the specific rules. And here Paul describes both as being holy, meaning they are not sin, but they are pure and separate and apart from sin.
And they are just, meaning they are correct and proper and righteous in their claims and penalties.
And they are good, meaning they produce a result of happiness and prosperity, which is in direct contrast to sin which produces a result of unhappiness and destitution.
Gods objective for every individual, is to possess perfect happiness, perfect prosperity, perfect security, among other things.
The law, describes the path to those objectives, but also identifies man’s inability to follow that path on his own, and therefore man’s inability to obtain those objectives on his own.
Thus the need for a different method for obtaining those results, namely salvation by means of another person.
If you can’t do something on your own, then you need someone else to help you.
Remember one important concept, that most people ignore, when they claim knowledge of or adherence to, the Mosaic law.
The law includes the rules of life, but it also includes the feasts and sacrifices, which teach access to life, by means of the work of someone else.
And of course that someone else, is Jesus Christ.