Make them suffer. Embarrass them, let them trip in front of their crush, stutter while public speaking, fall and scrape their knees, say the wrong thing to their friend who’s grieving a loss. Make your main character suffer.
Why? Because perfect characters are boring characters. Have you ever read a book where the main character knows exactly what to say, exactly what to do, and exactly when to do it? Even a supporting character! They’re boring!
I spoke with an artist once. He told me people like to connect with art so he liked to paint his surroundings. People want to connect with books too. That’s why the entertainment industry is all abuzz with talk of representation in the media. It’s not only demographic matters people connect to. They want to find people going through the same struggles as them too. Take Smile for example! It’s a graphic novel of a young girl between the ages of 11 and 13 who knocks out her front teeth, has to have massive amounts of oral surgery, starts middle school, gets bullied, finds her first crush, fights with her siblings. Really, normal stuff. Kids about in middle school and about to start middle school really connect with that particular book in our library’s collection. And a perfect main character wouldn’t have her little sister running circles around her singing “All’s I want for Christmas is my two front teeth!”
What drives a plot line is conflict. You need your beloved fictional friends to experience friction to keep them driven and keep them moving. There’s no such thing as perfect people. Imperfect people don’t want to read about perfect characters. Make them human (even if they’re technically elves, or dogs, or werewolves, or what have you!) and make them make mistakes.