People with less knowledge and skills often have more self-confidence. When looking at self-confidence, it is often higher in beginners than in those who are more competent. This stems from the fact that beginners have less knowledge and skills and lack the metacognitive ability to realize that their choices and conclusions are sometimes wrong. The reverse is also true: people who are extremely competent often doubt themselves more because they know how complex or vast something is. Have you ever been surprised as a teacher by students who would give themselves an extremely high grade? Or that student who is very good at something but downplays it enormously? Students who start something very motivated and then completely lose the motivation to continue because 'it will never work out'? These are all examples that can be traced back to the Dunning-Kruger effect. The effect implies that what you need to know and be able to do to perform a task well is exactly what is needed to assess whether you have done the task well.
Kruger J, Dunning D. Unskilled and unaware of it: how difficulties in recognizing one’s own incompetence lead to inflated self-assessments. Journal of Personality and Social Psychology 1999;44:247–296, PMID 10626367.
Dunning, D. Chapter five — the Dunning–Kruger effect: on being ignorant of one’s own ignorance. Advances in Experimental Social Psychology 2011; 44:247–296.
Nuhfer E, Cogan C, …, Wirth K. Random number simulations reveal how random noise affects the measurements and graphical portrayals of self-assessed competency. Numeracy 2016; 9:1.
Motta M, Callaghan T, Sylvester S. Knowing less but presuming more: Dunning-Kruger effects and the endorsement of anti-vaccine policy attitudes. Social Science & Medicine 2018;211:247–281, PMID 29966822.