There are no hard, permanently set rules for creating a character, but there are things that work and things that don't.
By this point most people are familiar with the term 'Mary Sue' or 'Gary Stu'. They're words used to categorize a particular brand of underwhelming characters. A 'Mary Sue' is just an extreme stereotype example, just as some other terms are. Everyone who knows of them knows how to avoid making one -- or think they know. A character that isn't a 'Mary Sue' is not immediately compelling. The avoidance of the extreme does not mean the character is awesome, it just means they don't suck at the most extreme level.
For all intents and purposes a character is a person separate from their creator. Sometimes a character might be the embodiment of what a owner wants to be or how they see themselves; we call this a self-insert, and this should be avoided. Each character is going to have a different style. Each will speak, think and communicate different from