If you’re impulse buying crap online, I find keeping items in the shopping cart for a day or so gives me time to think before pulling the trigger. If it’s an emergency that’s one thing, but most of the time it can wait.
Also I find budgetting apps to be really helpful in curbing unnecessary spending.