Interesting question. For me, the genuine answer looking back is, partially.
When I was younger and unfit / out of shape, I didn't feel like the best version of myself. I was always a high achiever throughout my life, and hence in theory, I should have been truly confident. But I wasn't. Sure, I would still find numerous opportunities for sex because of the stories of my cock, but I didn't feel like a stud, mainly because of how unhappy I was with my lack of discipline towards my fitness and physical fortitude. So during that stage of my life, my confidence was based more on the size of my cock and on my professional achievements, but I still felt incomplete.
A few years back, I decided that it was time for me to walk the walk in all aspects of my life. I told myself that I'm going to get in shape, because if I was to be the man that I always envisioned myself to be, then I had to lead by example. I spent the next few years sticking to a diet, going to the gym regularly, getting good sleep in, going the extra mile, even when I didn't want to. When all I wanted to do was to stay in bed and sleep, I willed myself to get up and chase my goals, no matter how much I dreaded the process. I focused on my grind and was committed to it.
The results of that consistent commitment to myself made me realize just how much my perspective and outlook towards life changed, and I feel that change in my demeanor was observed by everyone around me. Whereas back then, it would be an occasional hook up here and there, now I was bombarded with requests by beautiful women and hot guys, people that saw my results and wanted to be a part of my journey, for however long they could be in it for.
As an additional point, the sex is more fulfilling now. Much more fulfilling. It always turned me on to hear my partners' screams as I fucked them. I am a sadist in bed, after all. But back then, I always felt angry at myself when I looked in the mirror as I fucked them and saw a fat, unfit version of myself staring back at me. The aesthetic just never felt right. Now, after all the years of pain, struggle and discipline, I see a stud staring back at me, the stud I always wanted to be. To hear their screams as I see a ripped, hung stud staring back at me, to be this stud that I finally see. That.... that gives me my sense of confidence.