I wish I could remember where I found this, but there was a fascinating read a few years ago that helped me understand the social impetus behind teen girl behavior. In essence, they’re learning how to build communities, but some of that is expressed in gatekeeping/negative ways.
Unfortunately, that bullying is amplified to incredibly toxic levels online.