What purpose then [does] the law [serve?] It was added because of transgressions, till the Seed should come to whom the promise was made; [and it was] appointed through angels by the hand of a mediator. Galatians 3:19 (AMPC)
The law was not given to man to keep it because he couldn’t and can’t but to bring man to the end of himself so he could realize his utter bankruptcy and helplessness and call out to God for rescue.
The law is righteous, holy and perfect but can’t make man righteous, holy or perfect. Like a mirror it will clearly show you all your blemishes but won’t remove them. It only points out to man that he’s a wretched sinner doomed to death.
The purpose of the law was to fully exhaust all our supposed options at trying to self-improve and save ourselves because the law concluded all humanity as sinners, guilty, condemned and dead in trespasses.
The law brought us or should bring all of us to the place where we see Christ as the One and Only Option of Salvation.
Because the law has already finished its job – namely silencing every mouth (both religious and irreligious, self-righteous and openly wicked) with the verdict that ” all have sinned and fall short.. and there’s none righteous” it is no longer required. Christ to whom the law and prophets pointed has already come.
We should look to and depend on Christ who is God’s Salvation and Righteousness and Holiness to us.