What's the best way to learn from your losing trades?

Been tracking my losses for months now but still making similar mistakes.

Usually just note what went wrong but wondering if there’s a better system to actually learn from them instead of repeating the same patterns.