I think it is a complex mixture of things. To some extent, people are better at recognising mental health issues, and accepting that very young children can have serious mental health problems. When I was at school, for example, children may have been labelled 'maladjusted' or 'emotionally disturbed', and if the behaviour or absence from school was too bad, they would disappear into hospital or adolescent units. There were definitely pupils with eating disorders and they were largely not treated unless the child became dangerously ill, then the pupil disappeared into hospital.
When I was in an adolescent unit with an eating disorder, there were children in there due to 'school refusal', so the behaviour rather than the underlying MH difficulties was the focus of attention. Similarly, with EDs it was the behaviour that was targeted, not the underlying cause. Now, we are more aware that seriously challenging behaviours often indicate a raft of other problems including other mental health disorders
Yet, I would also say that social media does have a role to play. You cannot escape the bully, or the perfect images, or the cranky advice if it is in your hand or your pocket at home, at school and all around you.
However, as the parent of two Gen Zs, there is something about this generation (I cannot comment of the generation after) that is worrying. Yes, each generation is rife with crises of identity and the angst of youth, but there seems to be more serious mental illness now than there was in previous generations, and this is irrespective of our ability to better identify MH issues.
There could be social causes, and if our society is broken, the mental health of the most vulnerable or least resilient may also be broken.