We tend to judge ourselves smart when being right on something.
The trouble is that issues judgments and opinions are very diverse.
Being right on one thing is a weak evidence for being right in another.
(that aside from the strong random variable, that can make you right by pure chance)
PS. Similarly for mistakes, we tend to over punish ourselves for mistakes. If yo can learn from a mistake, ok. But feeling entirely stupid for a single mistake is unwarranted.