Failure is dealt with much better nowadays. It no longer carries (such) a stigma. As a result, a lot of methods for trying things fast are prevalent today.
Although this alleviates the emotional baggage that comes with failure, it does not solve the central conundrum of how to know when it is a failure.
To take advantage of the opportunities you have, you need to be able to decide: continue or stop.
There is the obvious answer: defining your criteria in a precise way. You think of your goal, what to measure when you are implementing it, and what is the minimal threshold of success.
When you iterate during execution, you come to a point where you know you’ve tried it all, you have no new directions to pursue, and you have not reached your success criteria - now you know it’s a failure.
However, there is another underlying layer of thinking you need to do to be sure that your criteria for success are surely right: the essence of what you are trying to achieve.
For that, start with discovering and defining the true essence of your idea. It will give you the fortitude to know better how to identify your success and failure, and help you save time and money.