For me it was when I was around 8 or 9 and met someone from Kenya. They could speak perfect English, wore normal clothes, and talked about having electricity. I'd literally never been told that those things existed in Africa - every reference to that continent only talked about tribes and jungles, save for Egypt which only talked about ruins and deserts. I asked around and found that most of the rest of the world has the same stuff we have, and most countries have a functioning government. I was so confused - why were we the country of freedom when everyone else has the same thing?
At the time I just assumed that there was something I was missing, or maybe the rest of the world just caught up to our idea, but eventually I came to the conclusion that they tell us we're the country of freedom - and keep our studies of other countries to a minimum when we're young - so that we can internalize the rhetoric that our country is the best before we find out that most other countries about the same, and often better in certain ways.
I realized that later, yeah. That's not something that a kid would usually realize is bad on their own, though; if it's something you and everyone you know has always done, most people wouldn't think to question it.