You have to think about it from an employers perspective and not just a perspective of "I can learn this online". Employers are far more likely to hire a graduate then a non graduate, especially if the job is in the specific field that your degree is in. The degree is the verification and proof of your ability to work in that field.
Sure you can learn the things taught to you at university online, but someone with a degree in, for example, graphic design, is far more appealing of a potential employee than someone who watched a bunch of YouTube videos and pinky promises that they know their way around photoshop. It ultimately looks much better on your CV, and in an increasingly competitive job market, this is particularly important.
There are other qualifications with similar value to a degree that can be more economically practical, such as certain apprenticeships, that are equally as valid but overall the impact a level 4 qualification (an undergraduate degree or equivalent) can have for your job prospects cannot be understated. As of 2023, the average university graduate makes £10,500 more per year than the average non graduate.
While I am not sure where you got your sources about the information on student loans you wrote, it appears to me you are repeating talking points often used in the USA where student loans are much less regulated and can tuition fees can cost upwards of $40,000 per year. The university systems in different countries can be very different, and can be much more predatory. Should we be talking about the USA, I would almost 100% agree with you that student loans are a ridiculous burden.
In the UK the you only begin to repay your student loans once you reach a certain income level, for those set to leave this year (me) that is £27,295 a year, or £2,274 a month, at which point you begin to pay £5 a month towards repaying the loans. This scales up incrementally until you are making £33,000 a year (£2,750 a year) at which point you will be paying the maximum of $42 a month. Should your income rise or fall, it will automatically be updated.
After 40 years after you graduate, any remaining loan yet to be paid off will be written off and you will be free of your student loan debt, no matter how much you owe. Should you never in your working life reach a yearly pay above the threshold, you will never have to pay your debt. It is predicted that 65% of students at university now will ever pay their debts back in full.
Also you claim that university is a waste of three years but I would argue that it is a very good middle step between living with your parents, and living alone independently (provided you live away from home for uni. If you asked me if I believed that I had wasted any of the two years I have been at uni for, I would say no, as I have met some of my best friends, and have had some of the best years of my life. Although this is ultimately my opinion and experience, and university is always gonna be what you make of it, and others experience may differ.
Hope this answers your question
Tom