Law is law. You can't bend it to your will. It doesn't bend, it only breaks.
It's not a buffet line where you can pick a dab of this and a dab of that.
It's ALL or NOTHING. Choose wisely.
Galatians 5:3
Again I declare to every man who lets himself be circumcised that he is obligated to obey the whole law.
James 2:10
For whoever keeps the whole law and yet stumbles at just one point is guilty of breaking all of it.
You need to understand the context of what Paul is saying. Notice l the very next verse in Galatians 5
“You have been severed from Christ,
you who are seeking to be justified by law; you have fallen from grace.”
GALATIANS 5:4 NASB
Paul is not saying we may live a sinful or lawless lifestyle and expect to be saved by simply believing in Christ. He is saying we are not justified (made right with God) by our obedience to the law. Now notice what Paul says later in the very same chapter
“But I say, walk by the Spirit, and you will not carry out the desire of the flesh. For the flesh sets its desire against the Spirit, and the Spirit against the flesh; for these are in opposition to one another, so that you may not do the things that you please. But if you are led by the Spirit, you are not under the Law.
Now the deeds of the flesh are evident, which are: immorality, impurity, sensuality, idolatry, sorcery, enmities, strife, jealousy, outbursts of anger, disputes, dissensions, factions, envying, drunkenness, carousing, and things like these, of which I forewarn you, just as I have forewarned you, that those who practice such things will not inherit the kingdom of God. But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness, self-control; against such things there is no law. Now those who belong to Christ Jesus have crucified the flesh with its passions and desires. If we live by the Spirit, let us also walk by the Spirit.”
GALATIANS 5:16-25 NASB
The “deeds of the flesh” Paul refers to are forbidden by God’s commandments and also by the Mosaic Law. If a person is living this type of lifestyle they will not enter the kingdom of God.
James is not finished with his message in James 2 at verse 10. He goes on to say...
“For He who said, " DO NOT COMMIT ADULTERY," also said, " DO NOT COMMIT MURDER." Now if you do not commit adultery, but do commit murder, you have become a transgressor of the law.
So speak and so act as those who are to be judged by the law of liberty. For judgment will be merciless to one who has shown no mercy; mercy triumphs over judgment.”
JAMES 2:11-13 NASB
Here James says to speak and act in accordance with the law and expresses the urgency of mercy towards others. He is not saying to disregard the law because if you try to keep the law and are guilty of breaking one law your guilty of breaking the entire law. That’s not his point here. He’s saying not to be partial towards some who break the law but not to others. He’s addressing unfair judgement towards poor or less fortunate people. He is not telling anyone to disregard the law.