The combination of breadth and depth of knowledge and experience available at universities is unmatched anywhere in the world. OP may find themselves more interested in developing neural interfaces, working on processor hardware architectures, designing next generation microscopy systems for biology, or a hundred other things. It's true that there are other entry points into those areas that don't involve being on a campus, but a good university provides efficient entry points into all of them. This is especially true for students who set up independent study courses for themselves, start/run student organizations, talk to professors about their research, and seek out research and project opportunities during summers.
I knew exactly the job & company I wanted to work for way before college, so I had learned everything relevant to that goal before I joined. From my perspective, I spent 3 years learning stuff I didn't want, or paying to be taught stuff I'd already learned on my own. Both left a sour taste in my mouth.
I graduated into exactly the job & company I wanted from the start. I give college zero credit for that. Well, maybe a little bit for getting past the "candidate has a degree" hiring checkbox, but I often question the value of that. 3 years of my life. Ugh. I was watching the clock the whole time.
The synergy of having hundreds of like-minded people working towards similar goals but each with a different specialization/interest, all while having energy and free time, is difficult to undermine.
If you want to be real good at inverting a binary tree and get a FAANG job ASAP, choose the academic route. If you love programming and want to get better at it with real world experience, get a job. You will have the rest of your life to learn about inverting binary trees if you really need to. 100% of what you will learn is available online, often for free.
Don't underestimate the effect of starting your career at 18 instead of 25. I'd rather hire the one with most experience.