I think of it as not a solutions engine but a suggestions engine.
Sometimes what it suggests won’t work at all. But other times it opens my thinking to an approach I had too much tunnel vision to see.
I end up writing the code ultimately. There was only once a tiny function I could paste in directly, unedited. But still helpful.
One great technique can be to ask it for options: “List five ways this code could be improved / more readable.” Usually about 1 in 5 suggestions will lead to something interesting.