@Bryonyshcmyony
Surely confidence is a social construct? If it were all about testosterone then men would automatically be more confident than women.
We're well off the OP's tpic now

but... the term 'confidence' is just used a short cut.
In animal behaviour, it comes down to the absence of fear behaviours, the frequency of investigative behaviours (e.g. willingness to approach novel objects) and/or the absence of stress markers such as cortisol levels. None of that is perfect or without flaws, but that's what's used.
It IS complex though. Experience and genetics also drive those outcomes so it's very hard to say it's just down to one thing.
In humans behaviours are even more complex but men are more "confident' then women in that they tend to under estimate phyical consequences - which one of the reasons men are more likely to engage in risky behaviours such as adventure sports. There are lots of other reasons (societal expectations etc) and there are lots of individual variations which mean women also engage in those behaviours. But at a broad-brush levels, that's why.
Plus, if you look in studies into business behaviours, you find quite a few examples of women being less self-assured than men - less likely to go for pormotions, less likely to ask for pay rise, more likely to underestimate their worth. Again, lots of influences go into that but testosterone plays a part.