For on the one hand there is an annulling of the former commandment because of its weakness and unprofitableness, for the law made nothing perfect; on the other hand, there is the bringing in of a better hope, through which we draw near to God. (Hebrews 7:18-19)
God’s word reveals that His law has a strategic inability. There is an arena in which the law has a “weakness and unprofitableness.” The law demands perfection, but it offers no perfecting resources. “The law made nothing perfect.” This inability is certainly not due to any oversight on God’s part. Rather, this inability is related to that which God never intended for His law to accomplish.
The law of God was not given as a means for perfecting people (that is, of providing spiritual change). God’s law was not designed to be a tool by which man could improve his spiritual condition in the sight of God. The law tells us what God wants to see in lives, but the law provides no resource to effect the necessary changes. Thus, attempting to begin or to develop a relationship with God by dependence upon our best performance will always be a hopeless venture.
https://www.blueletterbible.org/devotionals/dbdbg/view.cfm?Date=01%2F09