The Amplified version gives a little more detail in this verse.
"For no person will be justified (made righteous, acquitted, and judged acceptable) in His sight by observing the works prescribed by the law. For [the real function of] the law is to make men recognize and be conscious of sin [not mere perception, but an acquaintance with sin which works toward repentance, faith, and holy character]. Romans 3:20
Law keeping builds up the flesh. It makes one more carnal instead of less carnal. You begin to judge by the law, so you can think "Hey I keep the law better than Joe does, so I am better than Joe." That is why Jesus came to abolish the law because as long as you look at the law you are looking through a veil of flesh. Only when you look on Christ and realize that He is in you can you begin to lose your carnality.
We hear all the time that we should act like Jesus so then people will see Jesus in us. This seems to me that it cannot be true. If I force myself to act like Jesus, then I become phariseical and build up my flesh. Until you want to be Jesus from the inside out, all other effort is of the flesh and cannot inherit the kingdom of God.
I know someone who as a child went fishing with his father all the time and he was miserable, but he would not tell his father. He merely acted like he liked it, suffered through and found out later that his father recognized it and did not completely enjoy it either. Then over the years as he grew and began to like fishing himself from the inside out and loved going fishing with his father. Not only did he enjoy it but his father recognized the true joy also. The same is true with us. We are going to do what our Father wants us to do. If we do not agree from our heart that we love His will, we will be miserable and in bondage. When we learn to love His will then and only then are we truly set free because we love from our inward parts to do exactly what God causes us to do.
God is amazing.
CIY