This actually is a deep question that you have raised.
I think yes, friends do matter but not always in the way people expect. Here are my thoughts:
A good friend can be someone you can speak to without pretending, someone who accepts you but it is more about quality than quantity because one true friend is often better than many just for show and sometimes, having few or even no close friends gives space to knowing yourself better.
And what actually really matters is feeling connected, whether it is through one person, family, or community, so in short, we don’t need lots of friends but we do benefit from having trust, understanding and someone who truly and really cares.