1. Write detailed prompts.
2. Don't trust generated code output - it must be thoroughly reviewed, and feedback should be given back to the LLM.
3. AIs are very helpful for those learning new architectural patterns.
4. Try different tools.
If you really want to learn about using AI to write code (including the pros and cons), I think this post, https://news.ycombinator.com/item?id=44159166, is excellent. Note the author of the Cloudflare OAuth component, kentonv, makes a lot of good, insightful comments in that thread IMO.