The law was just a teacher showing us how to act until we got under the way of faith.
Obeying the law doesn’t make us right. Only believing on Jesus Christ saves us from our sin.
Why was the law given if it can’t save us?
The law didn’t fulfill the promise that God gave to Abraham, only Christ did that.