"I know that I'm a complete failure in life."I am much, much older than you, and how I wish I was your age and had pretty much my whole life ahead of me.
You could still accomplish so much, if that's what you want to do.
Just think of it. Could you save one life? I bet you could. Maybe you could save many lives, if you set your mind to it... but even saving one life is a lot more than many people do.
Often it is service to others that is most fulfilling. Consider volunteering at some place that's doing work you value. Apart from helping others in ways you care about, you can connect with others who share your deepest values, which are the best types of connections to make.. much better than the kind of connections you're likely to make on Tinder.
You could also pursue many other paths. You are pretty much all potential at this point.
Regarding loneliness, I've found that one of the best cures for that is learning to enjoy your own company and be your own best friend... that takes learning to like, even love yourself (not in a way that sets you above or ahead of anyone else, but in the sense that you have compassion for yourself and take care of yourself instead of being self-destructive and full of self-loathing). Be curious about the world, develop new interests, learn, do. Once you like yourself and enjoy your own company, you'll find others are more likely to enjoy your company too.
But you do have to reach out to others too.. not just cocoon yourself up at home or swipe on dating sites. Try going in person to meetups of people who share your (hopefully many) interests. Then, try to really connect with some of these people on a more than superficial level (this can take time and effort, but that's the only way it's going to happen.. there are no shortcuts). Try to find people who inspire and motivate you, and avoid those that bring you down and sabotage you. And, of course, don't self-sabotage.. that's the biggest trap. Many people are their own worst enemies. Try to find the wise course of action and actually follow through.
I could go on, but this post is way too long already. Hope some of it helped...