What did Jesus Christ establish to be taught in the churches? What He brought - in what we consider to be the New Testament era - is not at all contradictory or fundamentally different from what the Old Testament teaches. His message is complementary, completing the teaching of the Old Testament, rounding out and finishing God's revelation to mankind.
The word "but" in verse 17 has been inserted by the translators. In those Bibles that use the convention, it is in italics, which shows that it is a word added by the translators to clarify what they believe is the sense. Why did they choose "but"? The translators' fundamental belief is that Jesus came to change what was taught by Moses. However, if they had put together what the rest of the New Testament says, Jesus came and added to and completed what Moses and the other prophets preached. There is a better word to insert there: "and." Thus, "For the law was given through Moses and grace and truth came through Jesus Christ." They are complementary, not contradictory. Perhaps the word "supplementary" would better explain it, though what Jesus brought is both complementary and supplementary.
"Do not think that I came to destroy the Law or the Prophets. I did not come to destroy but to fulfill" (Matthew 5:17). Consider a candy jar, which is filled only an inch. That represents what Moses taught, the law. But Jesus filled the rest of the candy jar full! Jesus brought the spirit of the law. He filled to the full the revelation of God.
What Moses taught in the law is the law of the Kingdom of God. It cannot be separated from the gospel of the Kingdom of God that Jesus brought because the Kingdom of God needs law to function. God's Kingdom is a real entity. It is designed to function, and it will only function through law and, of course, grace, as they work together.