Paul was battling legalism, the idea that we must merely observe the law externally in order to be declared righteous, justified, etc. The New Covenant ushers in a new and higher standard-that we must be clean on the inside first of all-then the right external acts will follow. This can occur only as God becomes the God of each of us again, as we come to know and are reconciled with Him-because then He can do a work in us, of placing His law in our minds and writing it on our hearts (Jer 31:33).
Adam effectively dismissed this God and His authority, becoming his own "god" for all practical purposes, but, ironically perhaps, still looking for the God he rejected and disparately needs but now looking in all the wrong, created, worldly places. And then God comes to find us, when the time is ripe in our lives. Anyway, we become reconciled with God by believing in Him again, as our God, and then the relationship with Him that man was made for but that foolish and ugly pride destroyed can resume.
"No longer will they teach their neighbor,
or say to one another, ‘Know the Lord,’
because they will all know me,
from the least of them to the greatest,”
declares the Lord." Jer 31:34
"Now this is eternal life: that they know you, the only true God, and Jesus Christ, whom you have sent." John 17:3
And authentic righteousness now flows from this partnership, this communion, by its nature as we remain in God and He in us. Sin is, and must be, overcome in the big picture by virtue of this relationship, but under grace now rather than under the law which can only produce "white-washed tombs" at best, clean on the outside while still filthy on the inside.
"If we claim to have fellowship with Him and yet walk in the darkness, we lie and do not live out the truth. But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, His Son, purifies us from all sin." 1 John 1:6-7
"No one who lives in Him keeps on sinning. No one who continues to sin has either seen Him or known Him." 1 John 3:6
"Therefore, brothers and sisters, we have an obligation—but it is not to the flesh, to live according to it. For if you live according to the flesh, you will die; but if by the Spirit you put to death the misdeeds of the body, you will live." Rom 8:12-13
The law that God now writes on our hearts is the "law of love", love being the image of God we're to be transformed into and the very definition of justice or righteousness for man (which is why the greatest commandments are what they are). This love, flowing from the Spirit, produces works by its nature, the right kind, prepared for us in advance (Eph 2:10), excluding sin/fulfilling the law (Rom 13:10), doing good (Rom 2:7), producing holiness (Heb 12:14), putting to death the deeds of the flesh (Rom 8:12-13), obeying the commandments (Matt 19:17), causing purity of heart, meekness, and humility (Matt 5:3-10), doing "for the least of these" (Matt 25:31-46), exceeding the righteous of the Pharisees and teachers of the law (Matt 5:20), washing our robes (Rev 22:14).
"And hope does not put us to shame, because God’s love has been poured out into our hearts through the Holy Spirit, who has been given to us." Rom 5:5
And Scripture makes it quite plain that such things, such "works" must be done. Man's obligation to be righteous, to, for one, overcome the sin that causes his death, his separation from the Source of his life, does not go away with the New Covenant, but in fact, is now made possible, but with God now, by faith, because He, alone, can justify man.
"...not having a righteousness of my own that comes from the law, but that which is through faith in Christ—the righteousness that comes from God on the basis of faith." Phil 3:9
"Apart from Me you can do nothing." John 15:5
"I can do all things through Christ who strengthens me." Phil 4:13
A teaching I appreciate makes this statement about Adam:
"Seduced by the devil, he wanted to "be like God", but "without God, before God, and not in accordance with God".
God wants us to be like Him also, but this cannot be done apart from Him. Our faith is all about becoming with God first of all. Then justice and order are restored to His creation and His work, His plan of salvation that was meant from the beginning to ultimately produce something great, something better than He began with, is blossoming. It's been said that God created His world in a "state of journeying to perfection", a perfection that only He can fully know but which is achieved in us to the extent that we love him with our whole heart, soul, mind, and strength. Our job is to get on board, and remain there, with the help of grace, of Him IOW.