"Name" and "Zi" were separated until New China. "Name" is only used in formal occasions, and "Zi" is a daily address between friends. Because the ancients thought it was impolite to call "Zi" directly, it was more polite and intimate.
"Names" are basically given by parents, and "characters" can be given by adults or friends, and generally educated people will take "characters".
As for "number", you can write it down by yourself to express your ambitions, interests and hobbies. It can also be initiated by friends or admirers. These people feel that it is still impolite and disrespectful to call "Zi" directly. People with numbers not only have education, but also often have high social status.
Not only men, but also excellent women. For example, Li Qingzhao has a nickname "Yi 'an Jushi".