@janbb‘s suggestions are on point!
Another thing I would suggest is if there’s some new hobby you’ve always wanted to try, sign up for a class. It could be cooking, an intramural sport, sailing, martial arts, anything you think is interesting.
I’ve been kind of building a new life for the last few years. In my experience, there are a few important ingredients in actually making friends.
1) Get out of your house/ your routine, and go to a place where you can meet new people
2) Show up on a regular basis, become a “regular”
3) Be brave and ask a few people you like to hang out.
Even having an activity or a few people who are happy to see you can go a long way to alleviating loneliness. Real, kindred spirit kinds of friendships sometimes rise organically out of that.
Finding a support group could also be very helpful for you. Loneliness often goes hand in hand with depression. Support groups are very welcoming and give you a place to talk about your deeper feelings with people who understand.
Last suggestion, and this definitely won’t work for everyone- after we leave school, people make a lot of their friends in the workplace. Once or twice before I’ve had jobs with fun co-workers where we had a lot in common. It was pretty much like stepping into a ready-made friend group. Right now I have a job that alternates between boring and stressful, and nobody there is a good personality match. It makes a big difference. Finding a job where the culture is a good match for you could make a huge difference in your life.