I had the exact same situation you had when I was at uni funny enough. This is quite common although people are not really open about it or hide it behind fake smiles and social media posts. For me this was because my uni decision wasn’t quite what I pictured in my head and i was not well settled in.
Me? I just got used to it, realised that I need to learn to love myself and treat myself right instead of feeling sorry for myself and looking how people are living a better life on social media.
You can easily join societies and all or just talk to random strangers at Uni or your course. you can also find yourself, take this time to learn who you are what you like and what you want out of life and go and get it. Join the gym, start a business, pick up a hobby, get a job, read a book, plenty of things you can do to improve yourself and in turn make your life better and not just value life by how many friends you have because it’s just a downward spiral from there. Once you realise this things will start falling into place.
Better to have one good friend than 50 fake ones. Those are just some of the things I did at uni.
If you need someone to talk to feel free to message