The law kills but Jesus gives life.
2 Corinthians 3 “4 Such confidence we have through Christ before God. 5 Not that we are competent in ourselves to claim anything for ourselves, but our competence comes from God. 6 He has made us competent as ministers of a new covenant—not of the letter but of the Spirit; for the letter kills, but the Spirit gives life.”
The Ten Commandments brought condemnation but Jesus Christ brought Righteousness.
2 Corinthians 3 “7 Now if the ministry that brought death, which was engraved in letters on stone, came with glory, so that the Israelites could not look steadily at the face of Moses because of its glory, transitory though it was, 8 will not the ministry of the Spirit be even more glorious? 9 If the ministry that brought condemnation was glorious, how much more glorious is the ministry that brings righteousness! 10 For what was glorious has no glory now in comparison with the surpassing glory. 11 And if what was transitory came with glory, how much greater is the glory of that which lasts!”
Jesus alone brings salvation and transformation by the Holy Spirit living in the believer.
2 Corinthians 3 “12 Therefore, since we have such a hope, we are very bold. 13 We are not like Moses, who would put a veil over his face to prevent the Israelites from seeing the end of what was passing away. 14 But their minds were made dull, for to this day the same veil remains when the old covenant is read. It has not been removed, because only in Christ is it taken away. 15 Even to this day when Moses is read, a veil covers their hearts. 16 But whenever anyone turns to the Lord, the veil is taken away. 17 Now the Lord is the Spirit, and where the Spirit of the Lord is, there is freedom. 18 And we all, who with unveiled faces contemplate the Lord’s glory, are being transformed into his image with ever-increasing glory, which comes from the Lord, who is the Spirit.”
Those who trust in the Ten Commandments / Law are under condemnation and death.
But when we trust in Jesus, we are righteous and have eternal life.
Our Christian life is also based on trusting in Jesus and the Spirit bearing fruit.
This is not by the law but by grace.