You do not understand Grace
Grace is a gift and gifts can't be earned, so grace is incompatible with works insofar as they are done in order to earn a wage (Romans 11:6), however, there are other reasons that works can be required that are compatible with grace. For example, a gift can be the experience of doing something, such as giving someone the opportunity to experience driving a Ferrari, where the gift intrinsically requires them to do the work of driving it in order to have that experience, but where doing that work contributes nothing towards paying for the opportunity to experience driving it. Our salvation from sin would be incomplete if we were only saved from the penalty of our sin while our lives continued to be directed being being doers of sin, so there is an aspect of our gift of salvation that we are experiencing in the present by repeating and redirecting our lives towards being doers of the Law of God.
In Titus 2: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, so we are not extrinsically required to have first done those works in order to earn our salvation as the result and we are not extrinsically required to do those works as the result of having first been saved, but rather God graciously teaching us to be a doer of those works is part of His gift of salvation.
In Luke 10:25-28, Jesus affirmed that the way to inherit eternal life is by obeying the greatest two commandments, and something that we inherit is a gift, so he was speaking about what is intrinsically required in order to experience to gift of eternal life, not about the way to be good enough to earn it or pay God back for it.
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 the Law of Moses, 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 through faith.
In Exodus 33:13, he wanted to put false ways far from him, for God to be gracious to him by teaching him to walk in His way that he and Israel might know Him, and in Matthew 7:23, Jesus said that he would tell those who are workers of lawlessness to depart from him because he never knew them, so the goal of the Law of Moses is to graciously teach us how to experience knowing God and Jesus, which is His gift of eternal life (John 17:3).
In Genesis 6:8-9, Noah found grace in the eyes of God, he was a righteous man, and he walked with God, so God was gracious to him by teaching him to walk in His way and he was righteous because he obeyed through faith.
In Ephesians 2:8-10, we are new creations in Christ to do good works, so while Paul denied that we can earn our salvation as the result of our works lest anyone should boast, God graciously teaching us to experience being a doer of good works in obedience to the Law of Moses is nevertheless intrinsically part of His gift of salvation.
and you do not understand living in the Holy Spirit.
God has not commanded anything that is not in accordance with walking in the Spirit, but rather the Law of Moses is God's instructions for how to embody His character traits and His character traits are the fruits of the Spirit, which is why the Spirit has the role of leading us to obey it.
In John 16:13, the Spirit has the role of leading us in truth, in Ezekiel 36:26-27, the Spirit has the role of leading us to obey the Law of Moses, and in Psalm 119:142, the Law of Moses is truth.
In Romans 8:4-7, Paul contrasted those who walk in the Spirit with those who have minds set on the flesh who are enemies of God who refuse to submit to the Law of Moses.
In Galatian 5:16-23, Paul contrasted the desires of the flesh with the desires of the Spirit and everything that he listed as works of the flesh that are against the Spirit are also against the Law of Moses while all of the fruits of the Spirit are aspects of God's character that the Law of Moses was given in order to teach us how to embody.
In Romans 2:25-29, the way to recognize that a Gentile has a circumcised heart is by observing their obedience to the Law of Moses and circumcision of the heart is a matter of the Spirit, which is in contrast with Acts 7:51-53, where those who have uncircumcised hearts resist the Spirit and do not obey the Law of Moses.
In Hebrews 1:3, the Son is the radiance of God's glory and the exact likeness of His character, which he embodied through his works by setting a sinless example for us to follow of what can equivalently be described as walking in the Spirit or as walking in obedience to the Law of Moses.