You need both. My sense is that only a minority of people are hardwired to preferably live as hermits. And whilst it's an important life skill to be happy alone, everyone has their breaking point, it's no coincidence that one of the best predictors of longevity is how rich ones social life is.
I'm not talking about being hermits. But if you have one hour alone, you could learn to be happy with your own mind available. Of course most people (not hermits) need social relations.