Years ago, when facebook meme pages were a big scene, I ended up joining one on a pure whim because the admin posted that there were essentially open tryouts. I was one of the admins on this page for a while, and eventually people liked my posts so I got invited into a group chat. Since then, I've been in several others and know some of these people very well.
In another instance, a person I knew irl who I hadn't seen in years wanted to reach out to me, and he knew I was hikki, so he invited me to a discord with him and his friends, who would eventually become my friends.
As for how you can do it, well, these are mediocre examples, really. I got lucky. When it comes to meeting people, luck is one of the most important things: the people you meet could be shitty, or just not really your tempo. People who have great relationships are always lucky in at least that regard. But I'm not just gonna tell you to be lucky. I couldn't have gotten lucky in finding a friend group if I hadn't reached out to that stupid meme page (that page was just a waste of my time outside of meeting new people, which was totally worth it). I couldn't have gotten lucky to join that discord if I hadn't known that guy years ago, and I couldn't have made new friends on it if I hadn't had the guts to join it and talk to people there.
There are lots of random opportunities to meet people on the internet, some very active and some very passive. Joining discords, social media groups, and shit like that which can be based around a mutual interest is a good way to generate some compatibility. I'm in a sekiro modding discord right now, and it's a pretty active little community, where I know that the people there are interested in something I'm interested in, and inclined to be consuming the same stupid meme culture. I only joined it to get updates on a mod, but there's opportunities there. A lot of mods and modding communities have discords or forums. These are just examples.
Once you're actually in these situations where you can talk to people, there can be loads of other obstacles, such as: general awkwardness, bad empathy skills, short tempers, general lack of confidence, and apathy (the last one is the most difficult). Those can be problems on your part, but also all the other people, and quite possibly both. It generally helps with some situations to try and have more 1-on-1 interaction, though that can sometimes make interacting with weirdos worse, bPost too long. Click here to view the full text.