You either have the confidence or you don't.
While it's true that a chunk of your confidence, perhaps up to 50%, is ingrained in your DNA, there's a lot you can do to increase the other 50%. For example, you can boost your "Confidence Quotient" by taking risks, trying new things, honing your talents, and doing a variety of other activities.
A more beneficial perspective is to remind yourself that there is no such thing as perfect certainty. Expect your confidence levels to change based on your everyday encounters. Recognize that no one is self-assured in every aspect of their life.
It is also common to experience bouts of self-doubt from time to time. Use your self-doubt to your advantage! Alice Boyes writes that she requires times of both self-doubt and self-confidence to accomplish her best job because self-doubt can be a motivation to learn more and put more effort into her work.