Gal 3:24 Wherefore the law was our schoolmaster to bring us unto Christ, that we might be justified by faith.

All Old Testament laws are leading us to Christ.

Heb 7:11 If therefore perfection were by the Levitical priesthood, (for under it the people received the law,) what further need was there that another priest should rise after the order of Melchisedec, and not be called after the order of Aaron?
12 For the priesthood being changed, there is made of necessity a change also of the law.

Just as the Old Testament priest was only needed until the coming of Christ, the high priest following the order of Melchizedek, so the law is changed when Christ, who completes the law, comes.

Heb 7:19 For the law made nothing perfect, but the bringing in of a better hope did; by the which we draw nigh unto God.

In fact, the law does not make us whole. The law eventually made us wait for a better hope, Christ.

Heb 7:28 For the law maketh men high priests which have infirmity; but the word of the oath, which was since the law, maketh the Son, who is consecrated for evermore.

Also, the law was imperfect by setting up those with weaknesses as priests. But God has made eternal salvation for us by raising His Son who has been made perfect forever.