You don't have to competent to have confidence.
I mean, it does help- like, a lot. For the most part though, confidence is a posture you develop through standing on who you are and what you do know.
That said, don't shrink back.
Nobody knows everything about everything. Stand up and never shrink back over something you aren't, or don't know. Instead, consider the realization of your shortcomings a sign showing you how you can improve, prepare and excel in the future.