Jenny,
I don't think there's a magic age so much other than it's more to do with leaving school and those almost tribal friendships that exist start to break up.
There's huge pressure on the young to conform driven relentlessly by social media. In ridiculung others you enhance your collective identity. You belong, are part of that circle.
That's not to say there's a sudden and dramatic sea change in behaviour upon leaving school more a drift towards adulthood. The world of work brings new realisations. University forces new friendships and a differing mindset.
I've experienced that "OMG that's a man" moment from one of a group of three teeagers. That was all it was. The moment passed. I've also had an "Oh look!" from a 60 something GG who blurted it out in sheer surprise at seeing me.
We'll get these reactions from across the age spectrum. Young girls in particular are however more likely to act collectively as a means of social bonding.