Not necessarily just professional skills, but all skills.
I am saying that confidence comes from being able to navigate the world with skills you have learned and not from dwelling on your history (alone or with a therapist) long after you already understand it.
Your emotions are too powerful to control and you can't change the past. Literally the only thing you can control is your behavior. What you personally, actually physically do.
If you take that control and focus it on being competent; you will gain confidence. You will trust yourself.
Meditation and therapy are good for introspection and knowing yourself. I have had a ton of breakthroughs of self understanding with both of those. But it's the times that I took action that made an actual tangible difference in my life.
I am a competent singer (for instance). That did not come easy. I spent hundreds of hours at karaoke sitting there my heart pounding waiting to get called up in front of people I didn't know. I have been boo'd. I have been on a stage when someone yelled YOU SUCK when my new girlfriend was there.
I kept going back and now, at the beginning of the night when everyone is far too sober to sing, I sing 4-5 songs. I have absolute confidence that if there is a microphone somewhere I will walk up to it and sing. Without music or prompting. I love music and that was my driver, but it was the focus of my behavior that lead me to being competent at singing. When I was single I'd ask attractive women to go up and sing with me. It bonds you to sing with someone, it feels great. I am not a great singer, but I'm more than good enough for karaoke, which is all I care about.
Replace singing with communication, coding, negotiating, driving, cooking, debating, talking to women, bidding on jobs, leading developers, writing, etc.