Both cost time, which is finite and precious. Stress reduces the amount of time you have available - if all of your time not working is spent destressing, you're not much fun to be around, and that impact your ability to make and retain friends
This is why most friends are made in high school and college.
The difference is very stark. I probably made 1-2 good friends in the _10 years_ after college, compared to 30+ friends in the 10 years prior to that. Luckily, I managed to keep most friends from before starting work.
Full time work is an absolute black hole of time and relationships.
People who don't have good networks _before_ they start full time work are absolutely boned and I don't think there's an easy solution.
As social animals who will eventually face the loss of every friend we've ever made, cultivating both a good network of friends and a kind of internal resilience is probably the best way one could choose to invest their time.
There are many very questionable ways to invest this finite/precious time, and most of us don't think twice about how much of it we squander (e.g. spending time online). There is a small category of things to focus on that is almost universally worth the effort: sleep, diet, exercise, social connection. Focusing on these things also tends to help establish that inner strength.
Find a hobby that you de-stress with others with so even though you're not fun at the beginning of the class/session, by the end of it you've screamed your frustration out and are pleasant to be around. Make friends at the end of this de-stressing event.