Our object with building something is to be perfect at it. Although you might have build something with 100% confidence that will be required by the customer, you will still get it wrong sometimes.
More importantly sometime, you build something and show it to the customer because you want to learn something more from the customer. This reduces the uncertainties of what you are building. That stuff that you build to reduce the uncertainty of the business but be discarded. Dont think of it as lost work. Think of it as work you did to have more confidence in the relevant customer prol.
Give yourself permission to waste some small % of your work. Sacrifice some work to be wasted to gain more insights on how to solve the problem better.