I’ve been so guilty of this the last year - I got into a really good position as I’m naturally quite sensible, then had a bit of a blip and was guilty of overspending. Not in debt, but just reckless unnecessary purchases, because I felt bad/anxious/classic pick me up.
I think, don’t beat yourself up too much - build good habits in gradually. Delete shopping apps off your phone, unsubscribe to sales/shops/etc emails, mute them on Instagram. Every time you go to buy clothes, devices, skincare, etc - open your wardrobe, your bathroom cupboard, and look at what you have. Adding up the static bills and putting them in a pot when you get paid, then another pot for your allowance for the month.