Failure is proof that you tried. It's defined by Merriam-Webster as "a lack of success". Success is defined as "the accomplishment of an aim or purpose". That means that failure would essentially be a lack of purpose or aim!
Understanding your desired end result is key to your success. Say you start a journey, without a goal or end in mind. There is no way that you can be successful because you can't plan when you don't know you are going. Knowing your goal is the 1st step. Planning is your 2nd step. Knowing the tactics and processes needed, what action items it takes to achieve your goal is the key to accomplishment. Lastly, the 3rd step is taking action on your tasks.
Executing your plan isn't a guarantee or a fail-safe. You must adjust, heed caution and remain focused. There will surely be obstacles that get in the way of achievement. Don't mistake these happenings as failure. They are lessons for success along the way. They will teach you what NOT to do or wake you up to unnecessary tasks in your plan.
Seek assistance or advice from others. Make note of the guidance that others have for you. It's not always in your best interest to "learn the hard way". Take the experience from others and apply it to your goals. The whole point is reducing failure so embrace the lessons learned by others and apply them to your own path.
Find your purpose, learn from your obstacles and failure will just be another word in the dictionary.