Doing more hard problems and learning how to persevere through them, even if it ends in failure.

There are some smaller strategies you can employ like doing introspection about decision processes that led you astray and learning how to avoid them. Reflect on what worked and what did not afterward. Try to recognize trigger points for both good and bad decisions then try to nudge your thinking toward or away from those decision points in the future.

The majority of it is simply doing more and persevering.