Recently I've had to make some new friends for the first time in many years, and what I've learned is that the most important thing is just showing up. Find people with a shared interest, and keep showing up regularly to participate in that shared interest - at least once a week is a good frequency to aim for if possible.
You don't have to be particularly outgoing or charming, but you should at least be polite and respectful. By getting together regularly with the same people, you will build familiarity, which can develop into friendship. Maybe not as strong a relationship as the best friend you had when you were younger, but so much better than being lonely.
"One only understands the things that one tames," said the fox. "Men have no more time to understand anything. They buy things all ready made at the shops. But there is no shop anywhere where one can buy friendship, and so men have no friends any more. If you want a friend, tame me . . . "
"What must I do, to tame you?" asked the little prince.
"You must be very patient," replied the fox. "First you will sit down at a little distance from me--like that--in the grass. I shall look at you out of the corner of my eye, and you will say nothing. Words are the source of misunderstandings. But you will sit a little closer to me, every day . . ."
The next day the little prince came back.
"It would have been better to come back at the same hour," said the fox. "If, for example, you come at four o'clock in the afternoon, then at three o'clock I shall begin to be happy. I shall feel happier and happier as the hour advances. At four o'clock, I shall already be worrying and jumping about. I shall show you how happy I am! But if you come at just any time, I shall never know at what hour my heart is to be ready to greet you . . . One must observe the proper rites . . ."
> what I've learned is that the most important thing is just showing up
This is undoubtedly true in my experience.
If the shared interest is goal orientated, like a team sport competition, or rehearsing toward a performance with an amateur theater group, then friendships are more likely to develop than not.
Also, if you are open to letting other people teach you stuff. ie: New skills, facts, or viewpoints -- they will tend to hold a favourable opinion of you, and it makes the whole process a breeze.
You don't have to be particularly outgoing or charming, but you should at least be polite and respectful. By getting together regularly with the same people, you will build familiarity, which can develop into friendship. Maybe not as strong a relationship as the best friend you had when you were younger, but so much better than being lonely.