i am against using ai for coding or for any creative field, everyone has a different style of learning but what i felt was the best thing for me in learning to code was just mindlessly building projects and when i was stuck somewhere reading the documentations(assuming you start out by learning to build in a particular language first)
but if you want to find the resources for learning to code, i reckon chatgpt will be quite good, though i would suggest try to build some projects on your own; cuz then this will be no different than the tutorial hell which people get stuck on where they are just copying shit and not learning