Look, I think AI can hypothetically be "useful" in certain specific limited contexts, but relying wholly on AI-generated code for a project is profoundly stupid. I think it's fine for rubber-ducking ideas or exploring a pool of information, but some people use it wholesale without knowing basic fundamentals.
I know learning to code can seem difficult. There's a lot of trial and error, a lot of failure, and sometimes the problem you're trying to solve is way more difficult than you thought it was. This is normal, and part of learning. It's okay if it takes longer, or if you have to struggle with certain stumbling blocks. That's how you get good!
Not everything has to be about maximizing output for productivity, especially if that output has issues that you have no insight or capability of fixing. It is in fact okay to go at a gradual pace.