I've been an amateur programmer for a long, long time. I've never had the time to really get fluent in coding. (I'm the type of coder who can lose an hour to stupid typos and similar bugs that should be easy to spot.)
I use ChatGPT to help with projects, generate code, point out problems with my code, etc.
It usually gets more "edge cases" figured out than I would without it, especially for implementing common functions. I also ask it to plug security holes in my code, and again, it does better than I would without it.
Just yesterday, it gave me seven different strategies for dealing with bots filling out forms. I implemented a couple in just a few minutes, and the bot problem immediately stopped.
Will mistakes happen? Of course -- but AI tools can help prevent them, especially when combined with one's own critical thinking. (I often correct the AI, ask for assistance in terms of preventing specific types of problems, or use prompts based on my own pre-existing knowledge, which then gets better answers than I would get otherwise.)