Add a little context and things become even clearer.
Romans 3:19-21
Now we know that whatever the law says, it says to those who are under the law, so that every mouth may be silenced and the whole world held accountable to God. 20 Therefore no one will be declared righteous in God’s sight by the works of the law; rather, through the law we become conscious of our sin. 21 But now apart from the law the righteousness of God has been made known, to which the Law and the Prophets testify.
Why didn't you include verse 18?
Excerpt from:
Paul on the Law: Romans Chapter 3
18
There is no fear of God in front of their eyes.
Lawlessness.
Obviously those verses don't describe those who have come to faith.
19 Now we are aware that, whatever the law is saying, it is speaking to those
under the law, that every mouth may be barred, and the entire world may become subject to the just verdict of God,
Paul makes it clear that those who break the law, are under the law; and that they'll be left speechless upon verdict. Those who break the law are under the consequence of breaking the law.
20 because, by works of law, no flesh at all shall be justified in His sight, for through law is the recognition of sin."
What is sin?
(CLV) 1Jn 3:4
Everyone who is doing sin, is doing lawlessness also, and sin is lawlessness.
Should we then abandon the law?
Of course not! Works of the law is obedience to the law. It's against the law to speed in the U.S.. People who respect that law make a conscious effort to stay within the limits; however they inevitably get distracted sometimes and exceed them. Maybe they don't get caught; because their normal mode of behavior is to respect the law. YHWH sees all.
Now, one day maybe a law abiding driver does get caught. Maybe it was the first time in his life that he was ever distracted. Is that a defense for the violation; that he never broke the law before? NO! He wasn't supposed to break the law. Keeping the law is what was expected of him; but a righteous judge will take the driver's will to obedience into consideration, and extend grace.
21 Yet now, apart from law, a
righteousness of God is manifest (being attested by the law and the prophets), 22 yet
a righteousness of God through Jesus Christ's faith, for all, and on all who are believing, for there is no distinction, 23 for all sinned and are wanting of the glory of God. 24 Being justified gratuitously in His grace, through the deliverance which is in Christ Jesus" 25 (Whom God purposed for a Propitiatory shelter, through faith in His blood, for a display of His righteousness because of the passing over of the penalties of sins which occurred
before in the forbearance of God),
This passage pertains to YHWH's righteousness, as in his patience, he passes over former sins, for those who come to faith. Does this mean that the law is abolished? Of course not, When the judge shows grace for a misstep; it's not a free pass to continue in lawlessness.
(CLV) 1Jn 3:9
Everyone who is begotten of God is not doing sin, for His seed is remaining in him, and he can not be sinning, for he is begotten of God.