Want to create new friendship

I feel lonely sometimes and know intellectually that it is a feeling that comes from within myself but my brain also wants to believe that it is because I no longer have friends I want to hang out with.

I want to have friends and feel connection. I do believe that it is important to create relationships. But I am stuck in “but how?”
I sometimes think back and miss the relationships I had then. But it’s probably the feelings I miss that I felt then?