I disagree. I know when I get questions right, or can't do them. In my experience, either I screwed up a question and legit didn't get the job, or I was fine and the interview process is just a bit random. Sometimes it's the interviewer's fault for asking bad questions. Most commonly it's: "how do you light a fire?" "with a match" "but you don't have any matches" "a lighter" "no lighter either" "flint" "no flint" "stick and bow" "all the wood around you is wet" "I give up" "you use a magnifying glass of course!"
You can actually ask for feedback and usually they'll give it. In the EU they have to tell you what they wrote about you in their internal system under GDPR (or at least my company's lawyers believed that)!
The one time I got really great feedback unprompted from a hiring guy it was basically "they were disappointed you didn't know X" and I was like "weird, I do know X!". Very interesting to see it from the other side but I don't think it was very actionable.
I would probably adjust my original post to say you cant better without useful feedback.
I always ask for feedback after an interview, its almost always useless. And conflicting between company interviews.
Its pretty rare for me to totally bomb an interview to the point i don't know the question. Usually the situation is I answered the coding question, handled the follow ups, wrote working code and still get the feedback that the coding portion didn't go well. How do you use that feedback? Useless imo.