Me, too. I get obsessed by a genre of things - shoes, a hobby, handbags, plants when I had a garden; I could write a very long list of my consumerist brain-worms. I think of something I "would like" then, before I've realised, I'm frantically researching it and finding lots of other things to like!
These days I'm quite good at putting things in the trolley but holding off on checkout. It helps, especially if I can talk myself out of it before revisiting the site (instead of fantasising all the lovely things I can do with it!) During a particularly bad phase I just returned everything I'd bought. Can't do that with plants, food or some hobby stuff, but I was buying lots of clothes at the time.
Since my brain obviously loves rabbit-holes of ideas and discoveries, I've found I can spend just as long and get just as fired up about learning things. I'm very random in this; other people might find more joy in picking one topic and tackling it properly - maybe a language, a historical period or a completely new skill set.
What do you think your brain's searching for? With mine, it's looking for NEW, SHINY, INTERESTING but there's another, more insidious aspect to it as well, something like validation. I feel like this current new thing could make me a better person in some way (it won't) and that, by spending money, I'm proving my worth. My chaotic explorations of the Ancient Greek understanding of colour and why Central European countries are always fighting each other (etc!) are great for the INTERESTING need, but I have to be really careful about the validation thing.
I'd love to be able to give you a cure ... since I've just spent £250, of which £35 was actually necessary, I don't think I can 😳 All I can do is ask you for your thoughts on what you're looking for when you go shopping, and maybe talk about other ways of dealing with it.