For me, it was a Twitch chat community. It started with everyone showing up the same time every week to watch a couple of people who streamed together. They eventually started a Discord server when Discord became available (which decreased the closeness of the actual Twitch chat community in some ways by making it all more asynchronous, imo, but did also solidify the community beyond Twitch in other ways). I've been to several meetups where I met many of those people, and have also separately met the two streamers a couple of times as well. I consider a number of them "online friends" to a varying degree.
I think something like Reddit would be unlikely to lead to this sort of thing, unless you're regularly participating in a small enough subreddit in a consistent/repetitive manner so as to recognize and be recognized by others (for example, I once helped run a little fanfic book club in a show's subreddit, and if that had gone on for longer, then I could see myself having gotten to know the other co-organizers a little better).
The key is probably to have some shared interest to bring you to the same place, but also an environment that's flexible enough to sometimes talk about things outside of the main interest. Older forums that would have an off-topic board were probably better about this than Reddit, since Reddit tends to segregate discussion about different topics into different places (with different people).