You should never try to avoid failure.
You are going to fail! Stuff won’t work out, you’ll make poor choices, or random fate will intervene. There is nothing you can do about this. If you try really, really hard you’ll just waste a lot of effort and the most you’ll accomplish is to redirect the inevitable failures to some other equally-important aspect of your life.
Instead, you want to be failure-resistant. You want the resiliency to withstand failures, endure them, learn from them, and even transform them into new opportunities.
Maybe a handful of times in all of human history was a human life defined by a single day, good or bad. You’re an aggregate. No failure will ever be written in stone across the monument to your life, so just look for the failures you’ll most enjoy or most learn from, and make sure you’re doing so much good and fun stuff in your life that failing at a small percentage of it won’t even bother you.
Failures are stationary. They stay where they happened. If you move forward, you leave them behind.