Something to consider concerning Matthew 5:17
Moses gave the words of the law in Deuteronomy. He went on to tell the Israelites God would send another prophet like unto himself who would come and reveal what the words of the law were really teaching, & they should hearken to this prophet.
Deuteronomy is actually about faith towards God and not your own works if you read it right.
The gospel of Matthew is the Gospel to the Jews written from the Jewish perspective. Jesus comes as that great prophet Moses spoke of & says in Matthew 5:17 think not that I have come to destroy the law and the prophets. I am come to reveal what the law and the prophets were actually always talking about. Jesus was saying I am not come to do away with the law and the prophets I have come to reveal the faith they were always talking about.
If you study ancient Jewish rabbinical writings you will see the term destroy the law and fulfill the law was an idiom that rabbis often used. If one rabbi thought the other rabbi was interpreting the law incorrectly they would stand up & say you are destroying the law. At which point the rabbi who was interpreting the law would say I am not destroying the law I am revealing the law for what it actually says, or fulfilling it. The Pharisees were often accusing Jesus of destroying the law and Jesus was telling them he was revealing the law and the prophets for what they actually were teaching all along.
Jesus came to establish the faith as the law of God. He came to reveal the mystery that was contained in the law and the prophets was the faith. Which is what he did at the beginning of Matthew 5 when he says blessed are the poor in spirit for theirs is the kingdom of heaven. Blessed are those that mourn for they shall be comforted. Blessed are the meek for they shall inherit an earth where only righteousness dwells. Jesus is saying blessed are those who rest in God and His grace for blessing and life, which is exactly what Deuteronomy was teaching all along.
Isaiah 2:3 prophesying of Jesus says a law will come forth from Zion and the people of all nations will flock to it.
Jesus was teaching the law Isaiah prophesied of in the sermon on the mount. He was revealing the law of God was about faith towards God not performing works.
The word law/Torah just means teaching and instruction. Jesus is the teaching and instruction of God. He came to reveal the truth about everything contained in the law and the prophets in himself. That’s why John said Jesus is the Word made flesh. In the gospel of John he says on the last day of the great feast Jesus stood up and declared himself to be the light of the world. What was he saying there? On the last day of the great feast the Jews were celebrating the Torah/law as the light unto their feet and lamp unto their way. Jesus stood up and declared himself to be the Torah of God. He stood up and declared himself to be the law of God. On this same day the Jewish people were also celebrating the end of one Torah cycle and the beginning of a new Torah cycle. When Jesus declared himself to be the light of the world he was declaring the beginning of a new Torah cycle where we would no longer know the law according to the letter but we would know it according to the Spirit. Thus Paul saying in 2nd Corinthians that Jesus is the Spirit of the Law.
The law Jesus says that not one jot or tittle shall pass away till all be fulfilled is not the law of moses which is only a shadow. The law Jesus is talking about that will not pass away til all be fulfilled is the teaching that says blessed are those whose faith is in God and His grace and not their works. This law Jesus came and revealed will not pass away til the lake that separates heaven & earth is removed and heaven and earth become one & those who are of the faith inherit an earth where there is no sin and death and only righteousness remains.