Paul’s letter to the Galatians has been greatly misunderstood throughout Christian history. It was one of his earliest letters, and the misunderstanding started as early as Acts 21. In this chapter Paul was visiting Jerusalem, where there were thousands of followers of Jesus, all zealous for the law that God gave through Moses. But for some reason they seemed to believe a false rumor that Paul was teaching contrary to the law. Paul went to a lot of trouble to show that he lived according to the law.
Why did these believers think that Paul opposed the law? It’s likely that they were familiar with Paul’s letter to the Galatians, which is easy to take that way if you’re not familiar with what Paul is talking about. An appropriate background consideration is Peter’s statement in 2 Peter 3, that Paul’s letters are confusing, and those who misunderstand them are likely to fall into “the error of lawless men.” This statement seems to be specifically a comment regarding Galatians.
It’s important that we realize that both Galatians and Acts 15 are dealing with the same topic, and were probably written about the same time. That topic is the question of whether Gentile believers should convert to Judaism. A person converting to Judaism was required to do three things: become circumcised (if male), be immersed in a mikveh, and vow to follow the law. That’s why following the law is mentioned in Acts 15:5. Some Jewish believers obviously thought that Gentiles should convert. The apostles discussed the issue at length, and concluded that they shouldn’t. Instead, they gave the Gentiles four basic laws to start with. Then they implied that they should attend synagogue every Sabbath, and embrace God’s commands as they came to understand them. (15:21)
In Galatians Paul writes in no uncertain terms that Gentiles should not convert to Judaism (be circumcised). He calls this “another gospel” in 1:6-9. It’s clear from a plain reading of Acts and Romans that Paul tried to live according to God’s commands in the law, and he encouraged his readers to as well.
But in Galatians Paul uses a couple of phrases that are often taken to imply otherwise. One, “erga nomou”, is often translated “works of the law”, and the other, “upo nomou”, is often translated, “under the law.” Both of these translations are misleading. For one thing, neither of them has the definite article (“the”) in Greek. So it’s not at all clear that they refer to the law given through Moses. Paul used the word for “law” in several different senses.
The phrase “under law” seems to refer to the penalty of law, i.e. you sin — you die. This is contrasted with “under grace”, which is the condition of a believer after Jesus paid for sins with his death on the cross. Sin no longer leads to death. But that doesn’t mean that we should willingly sin. God expressed how he wants his followers to live, and we should obey him.
The other phrase, “erga nomou”, “works of law”, is, I think, best understood by Jewish scholar Dr. Mark Nanos. He explains it fully on his website, https://MarkNanos.com . He prefers to translate it as “rites of a custom”, and sees it as referring to Gentiles converting to Judaism, as that is what Paul is talking about in this letter. Paul points out that people are not saved by converting to Judaism but by Jesus’ death. He points out that converting would obligate a person to obey the entire law (5:3), which would be overwhelmingly difficult for someone not raised in Judaism. That is why the apostles gave Gentiles the option of embracing the law gradually.
In closing, I want to point out that in 1 Corinthians 7:19 Paul essentially said that it doesn’t matter whether you’re Jewish or Gentile, keeping God’s commands is what counts. That should be the desire of each one of us, to love God and obey him. (cp. 1 John 5:3)