The purpose of the law was to condemn, to convict of sin, and that's what the law did to Israel.
The law was given to Israel not to save Israel but to prepare Israel for the messiah.
The law kills.
Romans 7:25
So then, with my mind I serve the law of God, but with my flesh I serve the law of...