I mean, what exactly defines a flaw for a character? I know that the character's flaws should have at least some impact in the story, instead of being just a mere detail, but what makes flaw X better than flaw Y? Is it how much it impacts the story or how interesting it is? Diseases or personal problems are considered flaws? Can a character have only one main flaw or should they have multiple? What are the characteristics of a good flaw?
The word "character" is used in two different senses. There is "character" in the sense of "characteristics" -- the way that a person does things that is different from how others do things. If someone whistles while they work, that is a characteristic.
The second meaning is moral character. A moral character is not a collection of distinguishing features, since we want everyone to have the same set of moral principles and behavior. Everyone's moral character should be the same.
The usual sense of the word character flaw relates to the second meaning. Another word for it is besetting sin. It is the sin or sins that the person is liable to make over and over again. Lady Mary's constant sniping at Edith in Downton Abbey is a character flaw (or the result of one). Of course, a character flaw in this sense of the word is also a characteristic in the first sense of the word: a piece of typical behavior.
A character trait in the first, non-moral, sense might also conceivably be considered a flaw in a particular situation. Someone of nervous disposition might not be best suited to the job of commando. Someone boisterous and clumsy might not make a good china shop assistant. Their character, in other words, may make them unsuitable for a task, even though it is not a moral failure. It is a flaw only in the context of the task.
In a sense, though, these two meanings converge, because in story terms a protagonist is faced with a challenge, something that they must do to gain a desire or avoid a loss, and the crux of the story is that trial they must face, that decision they must make, in order to succeed (or which will be the cause of their failure).
And so the character must come to some point, some task, some decision, for which they are in some important way unsuited. If they were well suited, the task would be easily accomplished without drama and we would have no story. Superman can rescue cats out of trees all day long, since it is a task for which he is eminently well suited, but by the time we have seen him do it the third time, we start to find it tedious. It is the task for which he is in some way unsuited that makes for an interesting story.
So, a good flaw is precisely the kind of flaw that makes it difficult, achingly and fundamentally difficult, for the protagonist to achieve whatever end they are compelled to pursue by the events of the story. Any flaw can be a good one if it plays this role, and any flaw can be a bad one if it does not.
So finish the following sentence:
My protagonist must ________________________ and this is extremely difficult for them because they are ______________________________________.
The second blank is your protagonist's character flaw.
I mean, what exactly defines a flaw for a character? Diseases or personal problems are considered flaws?
That's a fun question, isn't it? It's especially amusing when you consider that the answer will not only vary specifically from person to person, within reason, this will also vary from culture to culture. One reader may find your protagonist's swear-word-filled speech offensive while another reader may find it a natural result of the character's difficult past. It's difficult to foresee how people are going interpret every detail of your characters' personalities; I sometimes find it best to write traits, especially flaws, as simply genuine qualities of the person you're creating.
I know that the character's flaws should have at least some impact in the story, instead of being just a mere detail, but what makes flaw X better than flaw Y? Is it how much it impacts the story or how interesting it is?
Does describing a field of carnage after a massive battle between man-pig and centaur directly impact the story? No- you can describe the scene in a few sentences or a few pages. Just like descriptively conveying the details of a scene, character flaws first and foremost provide life to your characters. Jon's penchant desire to seek out the first brothel in every town may end up in him finding true love, contracting an STI, a subtle response to dealing with loneliness, or have no other meaning than he just likes sex (a lot).
Character flaws can be mentioned briefly in passing and never brought up again. Just like describing the color and health of a lily on a trail, you're just providing material for the reader to become more immersed into your world. With that said, it can also dictate or at least influence the actions of your characters. I don't think one often sees flaws directly impact the story, unless the story is somewhat built around that flaw (Man's lust for power in The Lord of the Rings, the influence of emotions in Star Wars). But for example, if Jessica Jones was stumbling through a fight due to being drunk (which is common given her alcoholism), then her flaws are impacting a scene but it need be the lead navigator for the rest of the story, depending on the significance and result of the fight.
Can a character have only one main flaw or should they have multiple?
That depends on your character and how much those flaws impact their decisions, or lack thereof. Ultimately both are up to you.
What are the characteristics of a good flaw?
Context really matters when considering this question. As a flaw, being late by 5 minutes to every situation seems a bit humorous but if Xandu Nax hails from a specie called GlorbZorb who finds it criminally offensive to be late... By and large a flaw should be believable, and this will depend on the setting of your story, the genre, and your ability to convey that flaw to the reader.
In general, a "good flaw" will matter, meaning it will impair the hero in their quest, and presents an obstacle for them to overcome. Not necessarily permanently, but for the purpose of this story at least.
The flaw can be a disease or crippling, or it can be psychological: They hold a grudge, or they aren't very smart, or they are too impulsive, or they are too gullible or easily conned. Maybe they always look for the quick fix; maybe they are lazy. Maybe they don't pay attention to the feelings of others. For some fighting characters, they can be too prone to seeing violent solutions instead of other better solutions, like subterfuge. Maybe they joke too readily and offend people, or maybe they really don't have a sense of humor at all. The flaw can be they are a very poor liar, and people know when they are lying. The flaw can be they are too blunt with the truth, and think they should be. The flaw can be they are too judgmental of others, and this leaves them with very few friends. For many "nerd" stereotypes, their genius is balanced by a flaw of being terribly socially awkward and spurned. That could apply to a character that is NOT a nerd, too.
If the "flaw" doesn't really matter, it doesn't influence the plot or character and doesn't have to be overcome, it is less of a flaw and more of a trait; and probably doesn't need to be described.
The POINT of the flaw is two-fold; it humanizes the hero (they aren't perfect in everything), and it is used to cause many small conflicts that slow them down or denies them information or resources they need to complete their mission, or shuts down certain paths to that information. The socially awkward nerd isn't going to somehow seduce the hot secretary to get into her boss's office.
My view of flaws:
A character should not be perfect. They should not be so lovable, powerful, intelligent, etc., etc., that the reader rolls their eyes and hopes that they die a horrible death.
And a character should not go sailing through the story with perfect ease, overcoming every obstacle without really noticing it.
When you combine these two concepts--the character shouldn't be perfect, and character's progress through the story shouldn't be effortless--then you come to the idea that, OK, the character's imperfections may well have a role in the fact that the character doesn't have an easy time of it.
And that leads you to the idea of a "flaw".
But when you separate out that concept, it can lead to thumbtacking artbitrary negative things on the character, merely because you feel the character should have flaws. And that can feel artificial.
So I go back to the idea that the character should be imperfect. And, yes, they shouldn't have just one imperfection--they should have a whole box of them. Ideally, those imperfections should come into existence along with the character concept.
You generally shouldn't start with a character who is breathtakingly handsome/beautiful with genius intelligence, perfect pitch, and the ability to defeat sixty-seven armed men in a fight and then declare that, oh, but he also has debilitating migraines.
A character who's kind of good looking, who barely managed to finish high school because his parents didn't care to get help for his learning disabilities, who has nevertheless found a trade that lets him make a pretty solid living, who has conflicts with those same parents... is IMO infinitely more interesting. You can also give him both the perfect pitch and the migraines if you want to.
And then you may decide that the story is going to strain his areas of vulnerability--academics and his parents--because that looks interesting.