Plenty of charismatic people are socially inept, charmless, and unpleasant in close interpersonal relationships, but this doesn't make them any less charismatic on a stage. They often have no genuine friends, but tens or hundreds or thousands of people who will put aside their own concerns to do things for the charismatic individual.
Charisma is a pattern by which other people, for reasons that are hard to parse, and through mechanisms that are invisible, do things for the charismatic person. A charismatic person is threatening because others will kill for him, and he's a desirable benefactor because others will commit resources to his causes, but it seems to be a self-perpetuating phenomenon that snowballs and can carry on for most of a lifetime. It does seem to collapse in old age. This is why charismatic but hideous people like Harvey Weinstein, Donald Trump, and Bill Cosby meet such ignominious ends. They're invincible, until they're not.
There are skills that enhance a person's charisma. You can learn rhetoric, public speaking, and the norms of social interaction. But that's all they are: skills. Nothing can guarantee charisma. Nothing can guarantee that you'll get that core set of people to follow you that will produce a snowball effect. On that, it seems to be pretty random who wins and who doesn't.
Charisma exists because people want to be the charismatic person. They want to be someone who can wave a hand and bring ruin to their enemies. What they don't realize is that by following the charismatic, they're defeating their own purpose. It is not traits of the charismatic that generate this feedback loop. It is mostly just luck. That said, the way to improve one's odds to find people who are looking for a charismatic to follow, which means finding new territory, rather than hanging around an existing charismatic in a space where such people are already spoken-for.