If you are lucky, it could create something usable but my experience is 9 out of 10 are opposite.
Sometimes the code looks legit but you will know when you run it.
Maybe my skills issue giving inaccurate prompt. Maybe I used the wrong model.
It is getting better with less hallucinations nowadays but up to today, I am still skeptical.
It helps me refactoring my existing code or explore some technical ideas already created by someone else but if my idea is original, it will failed.
I still need to use my own knowledge and experience to put up the "puzzles".