950 B
the scripture imprisoned everything under sin. God did this so that the promise to save us by faith in Jesus Christ might be given to those who believe
Other possible meanings are 1) "because we all sin, God put all things under the control of the law, like putting them in prison, so that what he has promised to those who have faith in Christ Jesus he might give to those who believe" or 2) "because we sin, God put all things under the control of the law, like putting them in prison. He did this because what he has promised to those who have faith in Christ Jesus he wants to give to those who believe."
the scripture
Paul is treating scripture as though it were a person, and he is speaking of God, who wrote scripture. Alternate translation: "God" (See: rc://en/ta/man/translate/figs-personification)
save us
The word "us" refers to all Paul, his readers, and all Christians. (See: rc://en/ta/man/translate/figs-inclusive)