Our salvation is from sin (Matthew 1:21) and it is by the Mosaic Law that we have knowledge of what sin is (Romans 3:20), so while we do not earn our salvation as the result of having first obeyed it, living in obedience to it through faith in Jesus is intrinsically the content of the free gift of him saving us from not living in obedience to it. Our salvation from sin would be incomplete if we were only saved from the penalty of our sin while we continued to live in sin, so there must be an aspect of our salvation from sin that we are experiencing in the present by obeying God's law. Being a doer of God's law has nothing to do with trying to deserve salvation, but rather it is part of the content of God's gift of salvation, so freedom from the law would be freedom from salvation.The "freedom" is freedom from law for salvation, not to law for salvation. Through Christ, salvation is only by God's mercy and grace and not by works - it is bestowed upon someone solely as a free gift from an exceedingly merciful and gracious God unto those who in no way deserve to have it.
In Titus 2:11-13, our salvation is described as being trained by grace to do what is godly, righteous, and good, and to renounce doing what is ungodly, so we are not required to have first done those works in order to earn our salvation as the result and we are not required to do those works as the result of having first been saved, but rather God graciously teaching us to do those works is the content of His gift of saving us from not doing those works. Moreover, in Titus 2:14, it does not say that Jesus gave himself to free us from God's law, but in order to free us from all lawlessness and to purify for himself a people of his own possession who are zealous for doing good works, so becoming zealous for doing good works in obedience to God's law is the way to believe in what he accomplished through the cross (Acts 21:20) while returning to the lawlessness that he gave himself to redeem us from is the way to reject what he accomplished.
In Psalms 119:29-30, he wanted to put false ways far from him, for God to be gracious to him by teaching him to obey His law, and he chose the way of faith by setting it before him, so this has always been the one and only way of salvation by grace alone through faith alone in Christ alone.