"Do not think that I have come to abolish the Law or the Prophets; I have not come to abolish them but to fulfill them.
Everything about this statement profoundly points to the cross, for all of the Old Testament points there. The sacrifices, the creation narrative, God's dealing with Adam and Eve, the Exodus, and the many prophets all pointed clearly to the problem of sin and death, and the law has so far acted as the magnifying glass showing how lost we all are, and also, of course, the endless sacrifices under the law have only served to show the severity of our brokenness and the inadequacy of the law and the sacrificial system to fully and finally deal with our sin state.
Finally, now, God's profound answer foreshadowed by the Torah and the prophets, an acceptable sacrifice, a perfect lamb steps into the limelight. All of Heaven must have been holding its breath in anticipation while the world and the hearers here were scratching their heads over what Jesus said.
Note too what Jesus did not say. He did not say that he came to affirm the law but to fulfill it! He came to bring it to a full and satisfying conclusion! Yes, Jesus would now do what no man or woman had ever been able to do, live a righteous and holy life, free of sin, die a perfect death, the fulfillment of the foreshadowing of the Passover Lamb at last.
From that point on, the Old Testament law would still be in force for those not under the new covenant of Jesus' blood. But for those covered by His blood, a new law rules, written in our hearts.
So the law was our guardian until Christ came that we might be justified by faith.