OP, I don't want to dismiss your worries, but I think that's very common among the quieter boys at that age. DS2 had about a year-18 months around that age where I think he socialised in person about three times. I was sick with worry inside. but then I remembered DS1 had been similar, and DS1's geeky best friend's mum had worried about exactly the same issue with her son.
See if there's a pattern to who he games with, then invite them over for a gaming and pizza night at yours. Or see if there are any gaming conferences/launches/shows on locally and invite two or three of them to go with him. You may have to do the inviting.
I noticed a lovely mum started inviting DS2 out and realised that her lovely son liked DS but had no idea how to make overtures of friendship. They now see each other - not regularly because they're both introverts but they go to the cinema occasionally, for sleepovers occasionally and do fun stuff like escape rooms. DS2 is very gradually coming out of his shell.
I wouldn't worry too much about encouraging him to do something - just sign him up for something you think he'd like - scouts if he's outdoorsy is a great way of building friendship. DS did cadets for a few years and enjoyed it.
I made DS2 join a music group and then made him stick with it for the first year as each term he said he wasn't bothered to return. He really didn't want to. He's been going for three years now and they've started rehearsing outside school and even got a gig last term, unrelated to the music group. Now, he loves it.
The lovely quiet boys just take their time. For DS2, what was important was for us to strongly encourage and support his interests and nudge him to involve himself socially with likeminded people, because he was never going to do that unaided.
FWIW a couple of friends of mine have popular cool kid sons - A team rugby, invited to all the parties. There's a lot of bullying and rivalry among those boys - sometimes physically and emotionally really vicious. And they also have far more exposure to drugs and underage alcohol.