That is true.
There is a distinction to be made between loneliness and solitude though.
One can feel hopelessly lonely in a crowd, one can also find great solace in solitude.
In fact, another great cause of mental health issues is the apparently growing inability for people to stay still, instead constantly vying for interaction (and often resorting to that quick virtual dopamine hit loop, sometimes even when face to face)
There's balance to be had, both ways, but not everyone have the same needs.