The big issue Paul is confronting in his letter to the Galatians is salvation by grace through faith in Jesus Christ. Followers of Jesus are not saved by the good they do, nor are they condemned by the wrong they do, but they are saved, we are saved by trusting in the good Jesus has done. The Son of God became a man to be our Savior. Because Jesus suffered and died a sacrificial death, in Christ my sins are forgiven.
Because Jesus lived a perfect life, in Christ, God credits his Son’s goodness, his righteousness, to my account, so God counts me good, like Jesus is good. I am forgiven and I am righteous, I am right with the Holy God, because and only because of what Jesus has done, not because of what I have done or still need to do.