Galatians 3:22-23

3:22 But the scripture imprisoned everything and everyone under sin so that the promise could be given – because of the faithfulness of Jesus Christ – to those who believe.

Sons of God Are Heirs of Promise

3:23 Now before faith came we were held in custody under the law, being kept as prisoners until the coming faith would be revealed.