Yes, but consider that He is quoting directly from the Law/Torah (Deuteronomy 6:3 and Leviticus 19:18). We should ask ourselves, “Why is the Messiah quoting from the text that so many today say He came to do away with?” We should also understand that the first four commandments teach us how to honor our Heavenly Father. The last six commandments instruct us as to how we should treat our neighbor. Jesus/Yeshua is not doing away with the commandments given at Mount Sinai, He is reinforcing the teaching!
Obeying the commands (dogma) of men is legalism, however, obeying the instructions given at Mount Sinai is called obedience. Mark 7:5-9 What parent doesn’t expect their children to follow their instructions? By the way, the “Law” or “Torah” in Hebrew simply means “instruction.”
Consider the dialog found in Luke 16:19-31. (Please note that a specific name is given, therefore this is not a generic parable.) When the rich man pleads to Abraham to send Lazarus back to keep his five brothers from entering the place of torment, he is told, “If they do not listen to Moses and the Prophets, they will not be persuaded even if someone rises from the dead.” The Messiah did not say, “Don’t worry about a thing. In a short period of time, the Law will be done away with by the teachings of Paul.”
Matthew 5:17-19
(Look outside. Do you see ground? Do you see sky above? Then the law is still in effect and convicts mankind of his lawlessness!)
Ephesians 2:10 holds the answer to the question. Once we are saved by grace, we produce good works. It’s not the other way around.
Consider the following passage found in John 3:36, “He who believes in the Son has eternal life; but he who does not obey the Son will not see life, but the wrath of God abides on him.” (NASB) Then you have this passage, “What use is it, my brethren, if someone says he has faith but he has no works? Can that faith save him?” James 2:14 (NASB)
Psalm 119:9-12; Ephesians 5:26
“Did not Moses give you the Law, and yet none of you carries out the Law?” John 7:19
Just as it was back then, religious leaders today have laid impossible burdens on those who desire to obey the Law/instructions. Jesus/Yeshua said, “Take my yoke (an idiom for the Law) upon you and learn from Me, for I am gentle and humble in heart, and you will find rest for your souls.” Could your soul use some rest?
John 14:23-24 states the following, “If anyone loves Me, he will keep My word; and My Father will love him, and We will come to him and make Our abode with him. He who does not love Me does not keep My words; and the word which you hear is not Mine, but the Father’s who sent Me.”
Since the Son only spoke His Father’s Word, wouldn’t it make sense to obey all of the Scripture and not just focus on the New Testament?
"The law Jesus refers to is the law of the Old Covenant, not a new law, but the same law that He quoted to the rich young man and the lawyer when they wanted to know the revealed will of God. It becomes a new law only because it is Christ who binds his followers to it. For Christians, therefore, the law is not a 'better law' than that of the Pharisees, but one and same; every letter of it, every jot and tittle, must remain in force and be observed until the end of the world. Jesus has in fact nothing to add to the commandments of God, except this, that He keeps them. He fulfills the law, and He tells us so himself, therefore it must be true. He fulfills the law down to the last iota. "
- Deitrich Bonhoeffer, The Cost of Discipleship