How to instill self confidence in a child?

my sister and i are really confident, and i think a lot of it is because my mom always encourages us to talk. like even when we were little kids, my mom would mute the tv just to listen to our dumb anecdote about a ladybug or something. even when we used to ask questions like "where is the bird that dropped the baby in your tummy", she wouldn't get mad, she would just listen. i think a part of being shy is afraid of being judged, so if you're judged in your home environment, you think everyone is like that.

another thing is to let your kids make mistakes for themselves. it sounds counterintuitive, but if you're always doing your kids' homework, hovering around the play structure, interfering in all their kiddie fights, criticizing them, etc. they don't develop their sense of self-competence.

btw, my family couldn't afford extracurriculars, so while it may improve some cases, it isn't a definite cure. our grandparents didn't have anything like sports or music classes, but i'm sure all of them weren't shy :)