I believe these two comments fully explain the verses from Matthew.
Matthew Henry's Concise Commentary
7:1-13 One great design of Christ's coming was, to set aside the ceremonial law; and to make way for this, he rejects the ceremonies men added to the law of God's making. Those clean hands and that pure heart which Christ bestows on his disciples, and requires of them, are very different from the outward and superstitious forms of Pharisees of every age. Jesus reproves them for rejecting the commandment of God. It is clear that it is the duty of children, if their parents are poor, to relieve them as far as they are able; and if children deserve to die that curse their parents, much more those that starve them. But if a man conformed to the traditions of the Pharisees, they found a device to free him from the claim of this duty.
Gill's Exposition of the Entire Bible
For Moses said,.... That is, God by Moses; for the following precept was spoken by God, and written by him on one of the tables of stone, and delivered into the hands of Moses, to be given to the children of Israel:
honour thy father and thy mother,
Exodus 20:12, the sanction of which law is,
and whoso curseth father or mother, let him die the death,
Exodus 21:17. As the former of these commands is to be understood, not only of honouring parents in thought, word, and deed, but also of providing for them, when in want and distress, through poverty and old age; so the latter is to be interpreted, not merely of wishing or imprecating the most dreadful things upon parents, which some may not be guilty of, and yet transgress this command; but likewise of every slight put upon them, and neglect of them, when in necessitous circumstances: and both these laws were broken by the Jews, through their tradition hereafter mentioned; See Gill on
Matthew 15:4.