18 If I rebuild what I have already torn down, I prove myself to be a lawbreaker. -Galatians 2:18 BSB
Paul was referring to the Law—the old covenant. He was arguing the case about what would happen if a Christian started with the grace of Jesus Christ but went back to the works of the Law.
Paul Presents His Argument Of The Consequences If One Preaches To Go Back To The Law
After preaching the gospel of grace, which is the righteousness that comes through faith in Jesus Christ since He fulfilled the law, if I [Paul or any other believer] should turn around and rebuild it again [referring to the Law] by promoting that system—keeping circumcision, dietary restrictions, the sabbath, and animal sacrifice—that righteousness comes through its adherence. I have become a transgressor of the law of Christ and have introduced another gospel, putting me [Paul] under God’s curse. See Galatians 1:8 and its commentary.
Either we accept the righteousness of Jesus Christ by placing our faith in Him and what He did for us on the cross or try to make it to heaven on our merit. We cannot hold on to both. We have to choose one.