Good luck.
I'd recommend finding a MOOC course that covers some of the fundamentals of computer science to make sure you have a really solid grasp of the fundamentals - the whys and how's etc. Data structures, algorithms, networking, databases, design paradigms (so Object orientated Vs functional Vs whatever), testing etc. If they use multiple programming languages in different classes then all the better as I think learning more than one makes it easier to grasp the principles at a more theoretical/abstract level and not just how language foo does it and you'll find your favourite language(s) eventually in your own time so don't give up if the class is in a language you don't know/like.
It's tempting to use AI - I'd recommend you think of it as a knowledgeable friend who you can ask questions - is there a better way to do this/what alternatives are there? What does this function do? Why does this code do this and not that etc etc. You won't learn if it just implements for you, but as a learning companion you can bounce ideas off of or help you out of a rut etc it is great.
It is tempting to concentrate on like a React Bootcamp or whatever to get "practical skills" to start going off and building things, but I think that is like the difference of being the person who is paid to only assemble flat pack furniture following instructions vs the person who is paid to design the flat pack furniture and all the smart little fittings and how it all goes together and will it be strong enough and fit in the box and meet the price point and look like what the designer wanted it to look like and so on.
Finally, don't worry about writing "bad code" or bugs. We all do it from time to time and no one is perfect.
“knowledgeable friend who you can ask questions”
A friend who will randomly lie and mislead you in ways you can’t detect. Might be better to use ai for stuff like writing tests, summarizing data, and other low level stuff one can effectively supervise and where errors are low impact.
I would not treat current llm based ai models as an expert or a trusted friend but as the exact opposite, an unfriendly fake-expert. Unfriendly fake experts are still extremely useful if they work for free and can be scaled up, so definitely op should use ai, but he should never trust it.
Thank you for your kind suggestions and advice. Concentrating on 'practical skills' and 'shiny frameworks' is exactly something I want to avoid and focus on aspects (data structures, algorithms, networking etc) which you talked about.
I will keep your advise on AI in mind.