Confidence thrives on two types of recognition: external and internal recognition.
External recognition is the approval and praise of our peers. First from our parents, then from our friends, and later from the people we work with or work for.
Internal recognition is an inner sense of achievement and pride.
Confidence built on external recognition is fragile, as public opinion is not in your control and can flip in an instant. Confidence built on internal recognition is much more solid, as the outcome is in our own hands.
Internal recognition can be achieved by setting yourself challenging goals and achieving them. It can be achieved by mastery of something difficult.
Show yourself that you are capable of doing great things, and dare to be proud of yourself when you do.
Note: Being humble is a good trait, but make sure to not be humble to the point of self-depreciation.
Build the kind of confidence that is resilient, and independent of what other people think of you. Make confidence an inside job.