Wisdom is pattern recognition.
See the same situation play out enough times, you learn what works and what doesn't.
Experience teaches if you pay attention.
Most people repeat mistakes because they don't extract lessons.