How did you come to this conclusion?
It seems like part of the problem is you're just jumping straight to "going to hang out at a bar" when that's generally something people do when they're already friends. That happens when you already know each other, have shared interests, etc. Sure, there are people who go to bars and meet people, but when that works, it just means your shared interest is drinking... which can be okay, but isn't the right fit for a lot of people.
Is there something you're interested in? Go take a class in that. Not interested anything? Try martial arts, dance, something that gets you moving and interacting with people. Literally people are literally paying to come hang out with you at those places.
You're not the only lonely one out there. Find the others!