But the Scriptures declare that we are all prisoners of sin, so we receive God’s promise of freedom only by believing in Jesus Christ.
Before the way of faith in Christ was available to us, we were placed under guard by the law. We were kept in protective custody, so to speak, until the way of faith was revealed.
Let me put it another way. The law was our guardian until Christ came; it protected us until we could be made right with God through faith. And now that the way of faith has come, we no longer need the law as our guardian.