connotation
"Confident" is the clearly positive word here, describing healthy self-assurance without any implication of excess or arrogance — someone confident trusts their own abilities in a way that's generally admired rather than criticized.
"Arrogant" and "cocky" both describe an inflated, overbearing sense of self-importance that crosses into being unpleasant or off-putting to others, making them distinctly negative despite describing a similar underlying trait of self-belief. The difference between these words and "confident" lies entirely in connotation, not core meaning.
This trio shows how English can encode a value judgment into near-synonyms describing the exact same trait, which is why choosing the right word can subtly praise or criticize someone while appearing to state a simple fact.
Quration — Quration English