Most of my close male friends are through hobbies. Men talk shop while doing stuff. Its proximity. Shared activities.
But as I've gotten older, as someone pretty shy as a kid, I think you just need to be prepared to invite people to stuff (there are plenty of equally introverted people waiting for someone else to initiate friendship), and actually accept invitations to go to stuff. The former is especially hard because there is that risk of rejection.
Either way its not going to fall into your lap. I mean as much as kiwifarms likes to shit on "the internet" because daddy jim doesn't think internet friends are real, if you play games and talk to the same people every day, maybe open up a bit? It just depends on what you need from a friendship.