I used to have this problem as well, especially in real life where I was quite the awkward and quiet person. I grew up with little friends as a kid, so it was only during 3rd year high school where I started to be more vocal with people, mainly since my source of self-confidence back in that day was playing DotA and basically being skilled in video games, especially competitive multiplayer ones. Sure its not something that is relevant to everyone since not everyone's a gamer or heavily invested in video games, and obviously not everyone is like a competitive multiplayer gamer, but I find that looking for that avenue of building self confidence to be helpful. Like just look at yourself. Think of what you are good at. What makes you strong, what empowers you, etc etc.
And when i found out that people do indeed have very different tastes and preferences, i did widen my horizons by dwelling in other matters of interest. Like, in my case, gaming is fine and all, but there were people who i wanted to talk to who were more interested in art, so i tried drawing and i was able to build some confidence with it, since i knew that i could draw well if given the time to do so. I'd show my drawings (which at that time was good enough) and they'd see that i have some skills but its nice to know that they can even point out some flaws in my art.
its like when people ask about you being good at something, you'd easily find a few things to talk about and be proud of doing. And chances are, you might even recommend them to try things you'd like doing and they may end up doing the same, thus increasing your chances of gaining a lot of people to talk to.
It doesn't hurt to try really. I mean, there's a crapload of people who i would want to talk to here in our lovely little forum, but i have to think way to make them feel comfy talking to me in a conversational form. I mean i can always talk about my love of gaming, action movies, and Blood, ultra-violence, and Supermurder (BUS) in video games and movies all day, but obviously not everyone is in with that. (and it would be absolutely weird, even to me, if everyone was in to the whole BUS)