The παιδαγωγός (Law) set the standard for fellowship (or behavior) in the household of Israel. The Law in the Old Testament was not a means of justification, but a means of fellowship with Yahweh.
Righteousness never came through the Law (Gal 3:21). Righteousness came by faith on the Covenant Promises, which concerned the promised seed, who would "sprout" in the Promised Land, and who would be the son of both Abraham and David. The world would be blessed as a result (Gal 3:8). In this sense, the Old Testament believers actually believed on Jesus Christ before he was ever born. For example, Paul reminded Timothy that it was the "sacred scriptures" (another word for the Old Testament) that "gave the wisdom" that led to salvation through faith, which is in Christ Jesus (2 Tim 4:8). In other words, the παιδαγωγός can impart the wisdom, but the righteousness comes only by faith.
Thus the παιδαγωγός set the standards of behavior and taught believers about God's holiness. The Old Testament believer was therefore not a son as an individual, but a "household slave" under the παιδαγωγός (Gal 4:1-2). Of course, Israel was God's child in the corporate elective sense, but at the individual level, the believer was a "slave" who was managed by the pedagogue ("παιδαγωγός"), which was the Law. (The Law is described a "yoke" in Acts 15:10.) The reason the individual was a slave was because the Old Testament believer was still spiritually dead, notwithstanding that the Old Testament believer possessed righteousness through faith. In the New Testament (or, better, the New Covenant) the believer receives the free gift of eternal life through the Holy Spirit, and therefore becomes a son, who no longer is under the pedagogue (or the yoke of the Law).
Thus the pedagogue managed the child slave, who, at the appointed time (i.e., the giving of the New Covenant), became a son, who had the gift of God's eternal life. However, as a slave, the Old Testament believer was managed by a system of rules and regulations that typified typologies of Jesus Christ. For example, circumcision was the removal of the dead flesh, which Abraham had, and as a result, the promised seed came to life:-- Isaac was born. In Gal 3:17, Paul indicates that the Old Testament believers understood the promised seed not just in a wide sense of many descendants of Abraham, but in a limited sense, that is, he was the anointed one ("Christus"), who was the object of the David Covenant. And of course the sacrifices were typologies of the life of God (Heb 9:16-18), which was sacrificed to atone for sin. The sacrifice of Isaac was the key typology that the Promised Seed was indeed the sacrifice. That is, in Gal 3:16 Paul cited out of the Old Testament what was Yahweh's discourse immediately following Abraham's attempted sacrifice of Isaac. Thus the Law and its typologies of sacrifices and cleanliness and observation of holy days pointed to the object of the Covenant Promises (which is the Promised Seed in the Abrahamic and Davidic Covenants). Compliance with the Law (pedagogue) was the means of fellowship with Yahweh, but it was not the means of righteousness. Faith was the means of righteousness, and this faith was on the Promised Seed, and the Law (pedagogue) pointed to those promises, which "gave the wisdom" that led to salvation through faith in the Old Testament.