Any child who needs social security to go to school is undoubtedly a non-local permanent residence. This is true everywhere, especially in areas with excellent educational resources. The requirements are more stringent, not only for years of social security, but also for fixed residence and residence permit. These are all measures taken by local governments to prevent the disorderly flow of migrants and consume local educational resources.
Further reading: How to buy insurance, which is good, and teach you how to avoid these "pits" of insurance.