Hey man, I am 33 and I feel like I wasted lots of years not being social, during Uni for example, not living my life enough due to pow confidence and social anxiety, now my friends have their kids, married for a while etc, while I do have my career at a good place I can relate to your feelings.
First of all, stop comparing yourself to others, nothing ever good comes out of that, you can look at them for motivation, ask them for advice how to achieve something, but stop comparing yourself, everyone goes at their own pace.
I also had terrible anxiety during Uni, leaving everything to last minute, major anxiety during finals, barely got through it, but do you know what we call medical students who finish last in their class? Doctor. University is nothing, you know basically nothing after finish it, for most things it makes 0 difference whether you finish it with a B+ average or a D-, no one has ever asked me what grades I got in Uni (though I am in software development so YMMV).
Second of all have you considered not finishing Uni at all? Plenty of well paying jobs out there, something that might even make you happy. Trade jobs. Don't fall victim to the sunk cost fallacy of having finish something because you already invested so much time and effort into it.
And lastly, get in touch with a professional, whatever you are going through is temporary, life is awesome, but short, focus on the positives, don't waste it worrying about meaningless shit like degrees and status and how others are doing, you do you mate.