Know that it is a big world and whatever your interests there is probably someone else like you out there; it's just a matter of finding that person.
Accept that loneliness can be changed. If you reframe your negative thoughts into positive ones you can either learn to be happy in your own company, or take more risks to connect with others.
Become more active on social media. People who increase the number of posts on social media actually report feeling less lonely [28].
If you just sit around being lonely and do nothing, nothing will happen. You need to at least try. Take action. Get out there. Meet new people.