How to have multiple character classes in multiplayer game

i was thinking of 2 possible options

1: is having a different character class for each character eg: Character 1, 2 and 3

2: is having 1 character class and having multiple components that hold different information

like Comp1 holding all of character 1 ability info and Comp 2 holding all character 2 ability info

and having a Component distinguisher when character spawns

like if i choose character 1, when the class spawns in level it would see that only Components relating to Character 1 are needed

if having a separate character Class for each character is needed could you explain How to do this

and

Will having lots of components affect performance

Would Having components for everything be the right way

i just havent been able to get a functional character selection in c++