So what you are saying that we are saved by faith in Christ and not through obedience to the Law, but you are also saying that if we don't obey the Law we are not saved? Isn't that a contradiction?
There is a huge difference between saying that we need to obey God's law and saying that we need to obey God's law for the purpose of earning our salvation, and I only said the former, while you have been arguing against the latter. We do not earn our salvation by obeying God's law because it is not something that can be earned that can cause God to be obligated to give to us, yet the process of being saved from living in disobedience to God's law necessarily involves being trained to live in obedience to it. To use an analogy, if a professional musician were to train me how to play an instrument as a free gift to me, then the training itself would be the content of the gift and participating in that training would be doing nothing to earn it, but rather that is what it would look like to receive their gift.
In the same way, in Titus 2:11-14, our salvation is described as being trained by grace to do what is godly, righteous, and good, and to renounce doing what is ungodly, which is what God's law was given to instruct us how to do, so being trained by grace to obey God's law through faith is itself the content of the free gift and participating in that training would be doing nothing to earn it, but rather that is what it would look like to receive it.
In Matthew 23:23, Jesus said that faith is one of the weightier matters of the law, so obedience to it what faith in Christ looks like. Only those who have faith in God to guide us in how to rightly live will obey His law and will be justified by that same faith, which is why Paul said that only doers of the law will be justified (Romans 2:13), but notably did not say that we earn our justification by obeying the law. God is trustworthy, therefore His law is also trustworthy (Psalms 19:7, Nehemiah 9:13), and a law that isn't trustworthy can't come from a God who is trustworthy, so someone who refuses to obey it is refusing to have faith in God to guide them in how they should live, which is why they won't be justified, and why James 2:17-18 says that faith without works is dead and that he would show his faith by his works.
Isn't that what Paul was taking the Galatians to task about - that they started out in the Spirit by depending on the grace of God through faith in Christ, but now they are trying to continue by obedience to the Law?
Paul spoke about multiple different categories of law, such as God's law, works of the law, and the law of sin, so it is important to correctly determine which law he was speaking about. For example, in Romans 7:25, Paul contrasted God's law with the law of sin, and in Romans 3:27, he contrasted a law that was of works with a law that was of faith. Paul was not an enemy of God, so it should be absurd to interpret Galatians as Paul warning us against obeying God's law, but rather his problem was with those teaching Gentiles that they needed to obey their works of the law in order to become justified. God's law is trustworthy, so was can confidently rely on it to guide us, but should not rely on works of the law because they are not of faith in God.
In actual fact, the Law has been set aside because it failed, both for salvation and sanctification. We are not subject to the list of legal regulations in the Mosaic Law or even God's moral law at any stage - either when we first start with faith in Christ, to living the Christian life through faith in Christ.
God's law straightforwardly does what it was given to do and does not do what it was not given to do, and to say that it failed is to say that the Lawgiver failed, but He has not failed. Rather, we do not earn our salvation or sanctification by obeying the law not because it failed, but because it was never given for those purposes.
Christ set a perfect example of how to walk in obedience to the Mosaic Law, so he would have still taught full obedience to it even if he had said nothing, and as his followers we are told to follow his example (1 Peter 2:21-22), so becoming a follower of Christ is about seeing what he was doing and wanting to become part of that. Putting our faith in Christ is never treated as all alternative to obeying what he taught, but rather that is how we are to put our faith in him.
The existence of sin requires there to be a standard of what is and is not sin, and that standard is God's law. We are either under God's law and are obligated to refrain from sin, or are not under God's law, have no obligation to refrain from sin, have no need of salvation from our sin, and have no need of Jesus to have given himself to redeem us from all lawlessness. However, God is sovereign, so we are all under His law and are obligated to refrain from sin regardless of which covenant we are under. For example, God judged the world with the Flood for their wickedness even though they weren't even if a covenant relationship with Him. They didn't get to choose whether or not they wanted to be under God's law, and neither do we, but rather the choice that we do get to make is whether we are going to heed the Gospel message, repent, and obey.
We do not work to improve our righteousness and sanctification through trying to obey God's moral laws. That is mere self-improvement which leads to self-righteousness which is described as filthy rags before God.
If God's law were His instructions for how to become self-righteous and God doesn't want us to become self-righteous, then it would follow that God therefore does not want to be obeyed, which is absurd especially considering that all throughout the Bible, God wanted His people to repent and to return to obedience to His law, therefore it was not given as instructions for how to become self-righteous, but as instructions for how to express God's righteousness. In Isaiah 64:6, it is not God speaking, but rather it is the people complaining about how they thought God viewed their actions because He was not coming down and making His presence known. However, the reality is that the righteous deeds of the saints are like fine white linen (Revelation 19:8).
If we are doing that, grace is no more grace. The whole principle of grace and mercy is that it is unearned at any stage. There is nothing we can do to earn sanctification. Paul said, "There is nothing good in me, that is, in my flesh". If we are trying to improve ourselves in holiness, all we are doing is to try and improve our flesh, therefore we would be in the flesh and not in the Spirit. And the Scriptures says that those who are in the flesh will never be in the kingdom of God.
The Bible never describes seeking by faith to obey God as being in the flesh, but rather that is always disobedience to it. For example, in Romans 8:4-7, those who walk in the Spirit are contrasted with those who have minds set on the flesh, who are enemies of God, and who refuse to submit to God's law. In Galatians 5:19-22, everything listed as works of the flesh that are against the Spirit are also against the Mosaic Law, while all of the fruits of the Spirit are in accordance with it. After all, the Mosaic Law was given by God and the Spirit is God, so it is the Law of the Spirit.
So what is the answer? We have the righteousness of Christ which has been given to us as a free gift by God's grace and mercy. If we try to improve our own righteousness, we are rejecting Christ and His righteousness, and therefore Christ would not be of any effect for us.
So, being filled with the Holy Spirit, we become Christ's workmanship and are predestined to become conformed to the image of Christ through His working within us.
Christ is the exact image of God's nature (Hebrews 1:3), he expressed only that nature through his actions, and what that looked like was sinless obedience to the Mosaic Law, so there is no sense in wanting to to be conformed by the image of Christ while wanting nothing to do with his image. The reason why we have received the righteousness of Christ was not in order to hide it under a bushel, but in order to let it shine through our obedience to God's law in accordance with how Christ expressed his righteousness.
So instead of trying in our own strength to maintain obedience to the commands of Christ, we continually ask the Lord for grace and strength to allow the Holy Spirit to continue working within us to enable us to become the persons God wants us to be.
Obedience to God's commands has never been about what we can accomplish through our own strength, but about having faith in God to guide us. In Revelation 14:12, those who keep the commandments of God are the same as those who keep their faith in Jesus. Why do you think that the becoming the persons that God wants us to be looks like something other than following God's commands?