Then what you should do when you're about to buy something is pause, think "do I actually need to buy this?", then count out 60 seconds as you imagine better things that money could be saved for or more urgent things that are needs rather than wants.
If by the end, you decide that you are 100% certain you want the thing, then buy it. Otherwise walk away.
Join a Buy Nothing group. If someone asks for something that you have, and you haven't used it in a while, give it away! You can always ask for another to keep or borrow if you have a need for it in the future.