This kind of thing takes time, but you can and will improve if you want to. The person above is right. Also, yes, see if your uni offer any mental health services and seek them. I'm just copying what I wrote to someone else a few min ago below (it may not be entirely relevant):
You're not a failure, you're a strong person in development. Remember, everything changes. The brain, your environment, the people around you - everything has the capability to change over time, and it most likely will given some desire to change. My recommendations:
- Limit the amount of time you think about studying (to a few hours a day at most), use the Forest app for up to 2 hours at a time (4 intervals of 25 minutes and a 5 minute break). Realise that studying cannot be the focus of your life and if it is, it detracts from your physical and mental health.
- Go on a sort of social media detox. I use FocusMe on my computer and Lock Me Out on my Android phone to limit my activity on YouTube to 15-30m a day on each device, and limit all your socials and Netflix too. You can also use these blockers to block your devices after a certain time to force you to go to sleep earlier.
- Spend more time outside. Force yourself to go outside early, whether it's for a walk or anything else, everyday. Creating a list of checkboxes on a piece of paper, calling it a "habit tracker" can help with establishing good habits such as this.
- Gratitude journalling & meditation. These can also go on your habit tracker, but remember that it's easiest to establish one new habit at a time - but don't delay. You want change, and the only way you're going to get it is by taking action now.
- Consider exercising regularly, e.g. working out. (Fyi these all apply regardless of your gender)
- Stop watching porn/masturbating if you do (a blocker/accountability app can help with this, but this one takes time).
These habits will naturally lead to you feeling less addicted to YouTube, social media, etc. and your brain's "social needs" will not feel at all met by these, so this will make it easier to talk to new people and spend more time socialising. Remember, every failure is part of the road to success.