It is actually extremely common in Europe (as I linked to in a sibling chat), with 30-40% of kids having it at any time.
With those rates, my guess is that you probably had it several times, but just thought your bum was itching for no reason (or you were one of the asymptomatic cases). I think the awareness of it has gone up, now it's common to let the kindergarten know if you suspect it in your child, and they send a message to the other parents.
To be blunt you do not get it from eating cookies in sand. You get it from ingesting pinworm eggs, you ingest them by someone touching their bum (where the worms lay eggs) and then touching something that you then touch and touch your face/mouth, or scratching your own bum in your sleep then scratching your face / mouth.
If you don’t think it’s super commen in Europe it’s generally a lack of diagnoses. Literally 1/5th
Of British kids have it at any given time (and I imagine that tracks across Europe and USA at least)
NICE estimate 20-30% of kids 4-11 have an infestation. I have three kids in this bracket and yeh this tracks