Embracing Your Character's Flaws
Most writers have heard the advice that characters need flaws. In fact, it may have been some of the earliest writing advice you ever came across in regards to character creation, and there's a good reason for that. Flawless characters can be harder for readers to relate to or even like (which may or may not be important, depending on what you're trying to accomplish). They may also seem unrealistic; I don't know about you, but I've never met anyone who was completely perfect in real life. Giving a character some flaws can make them more well-rounded and believable, but it's not enough to simply pick a few random traits off a list, plunk them in front of your character, and basically ignore them after that. Unfortunately, that's a very easy trap to fall into. A better alternative is learning to embrace your character's flaws and using them to tell a better story.
Give your character flaws that matter
In other words, use your character's flaws to influence the plot and relationships with other characters. Maybe one of your protagonist's flaws is their big mouth. Maybe they say the wrong thing to the wrong person and it gets someone else in trouble or otherwise creates a conflict. Maybe it puts a huge strain on some of their most important relationships. There are a hundred different things you could do with that one character flaw. Sometimes it helps to brainstorm a bunch of possibilities and pick the ones that make the most sense. If you've already started writing, it might be easier to work backwards. Look at the characters you've already written and think about how their flaws might impact certain parts of the story.
For example, one of the major flaws protagonist Zira has in my dystopian novel, Secrets of PEACE, is her impulsivity. When I first started writing, I didn't really take her flaws into consideration. I knew she was stubborn and maybe a bit arrogant, but beyond that, I hadn't considered why she was that way or how it might impact the plot. It wasn't until I started rewriting the story again that I began to nail it all down. Zira is young and pretty inexperienced, so I thought about how those traits and others might influence her personality and thinking. I realized I could tell a more interesting story if I embraced her flaws, specifically her impulsivity. Suddenly, Zira was driving the plot in many of the major scenes I'd been struggling with. New conflicts arose as I began to understand her better. Her tendency to get into (or start) trouble with other people before really thinking things through allowed certain scenes to play out in a way that worked so much better. The story never would have been where it is now if I hadn't reexamined that side of her from a new perspective.
Let your character make mistakes and suffer the consequences
Sometimes our personal shortcomings can get us into trouble or influence us to make choices that aren't necessarily the best. We lose our tempers, say things we shouldn't, make bad decisions, and generally just screw up sometimes. The same should be true for your characters. Let them make mistakes. And when they do the Stupid Thing, let them suffer the consequences. As a reader, it's aggravating to see a character make a mistake or act incompetently and then have zero consequences for it. It's like the mistake never happened, or worse, everyone else around the character seems to accept it for no good reason and they all just move on. Unless you have an important story reason for doing this, don't. Life doesn't usually work that way, and it shouldn't work that way for your characters, either.
Don't ignore or diminish flaws whenever it's convenient
This is that easy trap to fall into I mentioned earlier. Honestly, I still struggle with it sometimes, but it's an important thing to keep in mind. You can't give characters all of these fantastic, potentially story-changing flaws and then just sweep them under the rug or dismiss them whenever it's convenient.
There's a series of novels I read several years ago that drove me insane for this very reason. I don't remember it being an issue in earlier books, but by the fourth one, it was painfully obvious that the author was ignoring established character flaws and the problems that should have arisen from them just for the sake of the plot, and the explanations given for doing so made absolutely no sense. It was aggravating. I felt like everything I had come to understand about the characters and the world they lived in was being flipped upside down for no other reason than because it was more convenient for the author. Don't do this to your readers. Don't turn your character into someone they're not just because it's easier. Writing is hard, and that's exactly how it should be. Learn to work within the parameters you've set for your world and stay true to the character's you've created.