For our purposes, a mistake should be taken to mean any action or decision that leads to further negative consequences for the character. Even something that could be seen as an objectively good action (ex: A child feeds a hungry, stray dog) can have additional consequences (The dog follows the child home, and her/his parents do not want a dog in the house.)
Mistakes deepen our understanding of a character. An individual’s choices are informed by their backstory, their priorities, their temperament, and so on. What is important to your character? What blind spots does your character have? When faced with a difficult decision, what’s the mental flow chart they go through to make the call, and how does this differ from the “ideal” path to a solution? When they misstep, what does it show us about their inner workings?
Mistakes create room for further conflict. The only time that a character should be able to potentially come up with the perfect solution to their problems should be close to the end of a story. If they solve everything before then, there’s nowhere else for the story to go. An imperfect/mistaken solution creates the potential for additional conflict/problems/story.
None of this is to say that a writer should force a character to make mistakes. That way leads to the scenario where characters behave like idiots for the convenience of the writer and the plot.