In the main, friendships start because of some sort of shared experience or interest. That is literally how you meet people and start conversations with them. A good way to develop friendships later in life is to put yourself into situations where you have those shared experiences with others. The flip side to that is that, particularly early on in life (and, to clarify, this is still where you are), you can have these shared experiences with a lot of people, most notably in school and, here, in university. Whilst that means it is relatively straightforward to find yourself in situations where you can make friends, it also means that you can find yourself in social situations with people that might be perfectly nice, but who you don't really click with. There may be an element of you not giving these people enough of a chance, but at the same time you may simply not have clicked with them. I realise that you feel like there might be a pattern developing of you letting people's imperfections get to you, but unless you have literally no friends at all, that isn't necessarily a bar to you making friends. You just need to find the right people.
I'm not someone who lets people's imperfections get to me, but even I don't have any lasting friends from my undergraduate degree, or at least no one that I am in touch with regularly. I was good friends with some of those people at the time, mostly from shared interests, but never really established good friendships at any point with people from my accommodation or my course. Yet I have made and still have very good friends from school, from my postgraduate course and, now, my work. And having said all of that, there will be times when friendships get stronger and weaker, or break entirely. There will also be times when you don't speak to people very often, but when you do it's like you've never been apart. Most friendships ebb and flow over time to some degree.
So I wouldn't be overly concerned in your situation. You never really run out of the ability to make friends, and as much as it's a good thing to reflect on your own behaviours (I've done it myself over the years with my friendships), you should also acknowledge that a lot of this will just be how life goes. You're most certainly not going to have lifelong regret over friendship choices you make in the first month of university. I got to know a range of people in my first year in accommodation, lived with them for three years after that, I didn't stay friends with any of them after university. I got on fine with them and, for the most part, didn't have an issue with them. We just didn't click in a way that would lead a lasting friendship, and that's ok. What I would say is that university is a difficult adjustment. Even if you're not going to be best friends forever, a bit of social contact really can help even in the short term. So I'd definitely go along and just see how things go. There's no need to dread it. You'll spend many hours with people you don't click with in your life. One evening that you don't enjoy isn't going to mean anything even a week from now. But you might get on with them better than you think, meet others that you click with, or just have a better time than you expect. You have, at the very worst, nothing to lose.