My (loose) formula:
1: Do I like it/like the look of it? Yes/No. If No, then Don't Buy.
2: Can I afford it? It's mostly been No for the past few years (being an English as a Foreign Language teacher during Covid times sort of sucked), now it's mostly Yes but I still prefer to buy loose and used. But there's still a Cost factor - it's a lot easier to justify a Scout or a Deluxe class figure than it is a Titan, for example. Especially since I also collect a few other things, so that Transformer I'm only mildly interested in could be, say, a Figma I like the look of or one of the the Number 57 Manhunter model kits I just found out about recently.
3: Is it a character I don't have yet, is it a particular personal favourite character, and/or can I repurpose it as a different character in my collection? I generally try to have just one version of each character in my collection, and also to have different molds to a large extent. It's a loose rule but I find that having 'clone' characters like the Sweeps or Seekers using different molds from different series makes for a more interesting collection for me, as does having characters who were originally remolds of each other as different figures from different lines, e.g. a Thrilling 30 Trailbreaker and an Earthrise Hoist. There are exceptions for favourite or major characters, and there's nothing wrong with getting a cool-looking toy and using it as an updated version of an old Micromaster or whatever, but still...I don't have the space or the budget for collecting entire different lines of the same characters over and over again.
4: As part of the above, do I have a version of the mold already? As a general rule, if I've already got a version of a mold, unless it's an extensive remold then I'll try and get whatever character is being remolded as a something with a different engineering or transformation scheme. Part of the fun of Transformers for me is the engineering and design, and I'd rather have different puzzles to play with than the same ones repeated where possible.
It's not a strict system and definitely isn't for everyone, but I find this approach helps stop the collection from getting out of hand while providing maximum interest and variety for me. Every now and then a character gets an upgrade but for the most part if I'm buying a figure then it's one I like the design of and the collection has stayed reasonably constant over the years.