you hit the nail here.. repetition is key! that’s what happens at a workplace or school. You show up every day, do your thing, and have small interactions here and there. Over time, those interactions grow, and you get to know each other on a deeper level and become friends.
This can be replicated with similar activities that involve a schedule, like joining classes, volunteering, or whatever else fits that kind of setup.
Within volunteering, I think it is worth shopping around. Some organisations do not treat volunteers well, and some are great social experiences.
I would try and get something where you can see the results in front of you. I worked years ago at a soup kitchen for the elderly and felt much better for it, than working in a charity shop on a till and feeling like I was just a worker unpaid.