“But before faith came, we were kept under the law, shut up unto the faith which should afterwards be revealed.”
King James Version (KJV)
3:23 But before faith - That is, the gospel dispensation. Came, we were kept - As in close custody. Under the law - The Mosaic dispensation. Shut up unto the faith which was to be revealed - Reserved and prepared for the gospel dispensation.
Ga 3:23 Before faith came, we were kept under the law, shut up. Before the faith was revealed we were confined under the law, as it were in prison, in a state of preparation for the faith which should afterwards be revealed. The law was "added" in order to do a work of preparation until the gospel was revealed. See Ga 3:19.