When asked to do something difficult or faced with a new challenge…
The cocky person says “I got this.” And then does nothing other than relying on their self-perceived “talent” to come through. They usually don’t.
The confident person says “I think I can do this.” And then works their tail off/acquires new skills/does whatever it takes to come through. They usually do. If they don’t, at least they can live knowing they did the absolute best they could.