The law was a guardian until Christ came. The law showed up sin for what it is but it could not save – no one can be justified by obeying the law. We are justified by faith in Christ. If we could be saved by law then Christ would not have been needed. We do not try to earn Brownie points (and salvation) by pedantically following the law. The more self-sufficient we are, the more righteous (and proud) we would be. God does not work with human pride but with humble people.
We need to humble ourselves and take up our cross daily following the one who made salvation possible – both for us and also for those faithful who served under the law (Hebrews 9:26). Grace is something that is not earned. Grace is a gift from God. By God’s grace, we can say with Paul:
It is no longer I who live, but Christ who lives in me. And the life I now live in the flesh I live by faith in the Son of God, who loved me and gave himself for me. Galatians 2:20
Some helpful Bible references on this subject:
yet we know that a person is not justified by works of the law but through faith in Jesus Christ, so we also have believed in Christ Jesus, in order to be justified by faith in Christ and not by works of the law, because by works of the law no one will be justified. (17) But if, in our endeavor to be justified in Christ, we too were found to be sinners, is Christ then a servant of sin? Certainly not! (18) For if I rebuild what I tore down, I prove myself to be a transgressor. (19) For through the law I died to the law, so that I might live to God. (20) I have been crucified with Christ. It is no longer I who live, but Christ who lives in me. And the life I now live in the flesh I live by faith in the Son of God, who loved me and gave himself for me. (21) I do not nullify the grace of God, for if righteousness were through the law, then Christ died for no purpose.
For freedom Christ has set us free; stand firm therefore, and do not submit again to a yoke of slavery. (2) Look: I, Paul, say to you that if you accept circumcision, Christ will be of no advantage to you. (3) I testify again to every man who accepts circumcision that he is obligated to keep the whole law. (4) You are severed from Christ, you who would be justified by the law; you have fallen away from grace. (5) For through the Spirit, by faith, we ourselves eagerly wait for the hope of righteousness. (6) For in Christ Jesus neither circumcision nor uncircumcision counts for anything, but only faith working through love.
For the promise to Abraham and his offspring that he would be heir of the world did not come through the law but through the righteousness of faith. (14) For if it is the adherents of the law who are to be the heirs, faith is null and the promise is void. (15) For the law brings wrath, but where there is no law there is no transgression. (16) That is why it depends on faith, in order that the promise may rest on grace and be guaranteed to all his offspring–not only to the adherent of the law but also to the one who shares the faith of Abraham, who is the father of us all
for then he would have had to suffer repeatedly since the foundation of the world. But as it is, he has appeared once for all at the end of the ages to put away sin by the sacrifice of himself.