I’m not a psychologist, so I can’t explain the exact theory, but basically my understanding is that self-confidence and self-esteem are linked to the concept of self-efficacy, which means the trust that your mind will be able to cope with the challenges presented to it. Low self-esteem and self-confidence are linked to all kinds of insecurities and challenges functioning.
Disclaimer: I recently began working on my own low self-confidence with my therapist and she pointed me to a book, the contents of which I’m mostly regurgitating here. The book is “The Six Pillars of Self-esteem” by Nathaniel Branden.