Upvote:8
It sounds like you are referring to compulsory education.
By and large, compulsory education appears to be a trailing indicator of heavy literacy, not a leading one. In other words, once a critical mass of people in a society become literate, it becomes seen as a necessity to function in society (either for the child, for society, or a combination of the two, I think is up for debate).
There's a really nice interactive graph of world literacy rates at Our World In Data that I've screenshotted at 1870 below.
Why 1870? This is not only the first year we have data for the US, but also one of the last datapoints before a lot of the nations on this graph began compulsory education. Specifically, for the 5 countries that gave data that year graph, the compulsory education enactment timeline was:
So of the 5 countries listed on that graph popup, only Italy had yet to achieve at least 2/3rds of their citizens literate before compulsory education was enacted. Sweden was the first of the 5 to enact it, but it was also already the most literate of the 5 at the date it did so.