What you're doing wrong is that you're asking it for something more complicated than babby's first webapp in javascript/python.
When people say things like "I told Claude what I wanted and it did it all on the first try!", that's what they mean. Basic web stuff that that is already present in the model's training data in massive volumes, so it has no issue recreating it.
No matter how much AI fanatics try to convince you otherwise, LLMs are not actually capable of software engineering and never will be. They are largely incapable of performing novel tasks that are not already well represented in their weights, like the ones you tried.
What they are not capable of is replacing YOU, the human who is supposed to be part of the whole process (incl. architectural). I do not think that this is a limitation. In fact, I like being part of the process.