Once upon a time there was a covenant made between God and the nation of Israel. It was based upon a law of hearing it and doing it. The ultimate goal was to be a doer of that word of law as they pursued right standing with God. In spite of how many may have thought they were performing as required, nobody could actually do it.
About 1,500 years later, the fulfillment of that law arrived in the form of a Person who came to provide a new and better option to completely replace the old one. This covenant would be established between Him and God the Father, available for the entire world, based not on doing— but through faith and believing.
The difference between the righteousness of the law and the righteousness of faith is infinite and eternal. It is important we don't confuse the two or blend them together. Our boasting is in Jesus and His doing.
As we keep browsing through the later part of Paul's letter to the Galatians, notice the contrast between flesh and Spirit. To Paul's dismay, the Galatians had been baited into adding works and law to their faith in Christ. Paul was trying to pull them out of the ditch and steer them back onto the road less traveled ... walking by the Spirit and bearing the fruit of the Spirit, where there is no law. Interestingly, notice Paul's point about how the Jews who were encouraging circumcision were not successful law keepers ... but were seeking bragging rights in the fleshly works of the Gentiles because of their recruiting efforts:
"As many as desire to make a good showing in the flesh, these would compel you to be circumcised, only that they may not suffer persecution for the cross of Christ. For not even those who are circumcised keep the law, but they desire to have you circumcised that they may boast in your flesh. But God forbid that I should boast except in the cross of our Lord Jesus Christ, by whom the world has been crucified to me, and I to the world." (Galatians 6:12-14)