Jesus set a sinless example of how to walk in obedience to God's law, so he was much more zealous for obedience to it than the Pharisees and he never criticized anyone for obeying it, but he did criticize them for not obeying it or for not obeying it correctly. For example, in Mark 7:6-9, Jesus said that they were hypocrites for setting aside the commands of God in order to establish their own traditions. In Matthew 23:23, Jesus said that tithing was something that they ought to be doing while not neglecting weightier matters of the law of justice, mercy, and faithfulness, so he was not opposing their obedience to God's law, but rather he was calling them to have a higher level of obeisance in a manner that is in accordance with its weightier matters.
In Matthew 4:15-23, Jesus began his ministry with the Gospel message to repent for the Kingdom of God is at hand, which was a light to the Gentiles, and the Mosaic Law was how his audience knew what sin is (Romans 3:20), so repenting from our disobedience to it is an central part of the Gospel of the Kingdom. So my motive is to spread the Gospel. Our salvation is from sin (Matthew 1:21) and it sin is the transgression of the Mosaic Law (1 John 3:4), so while we do not earn our salvation as the result of having first obeyed it, having the experience of living in obedience it through faith in Jesus is intrinsically content of his gift of saving us from not having that experience.
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, which we have by living in obedience to God's law through faith. 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 experience doing those works is the content of His gift of saving us from not having that experience.
People like to cite Romans 10:4 and 10:9-10, but they just as often like to ignore Romans 10:5-8 and the significance that Paul's point in those verses has on how we should understand the surrounding verses. In Romans 10:5-8, Paul reference Deuteronomy 30:11-16 as the word of faith that we proclaim in regard to saying that the Mosaic Law is not too difficult for us to obey, in regard to saying that obedience to it brings life and a blessing, in regard to what we are agreeing to obey by confessing that Jesus is Lord, and in regard to the way to believe that God raised him from the dead (Titus 2:14).