How Do You Know When to Stop Spending?

How do you know when to stop spending? What prevents you from buying everything you want as soon as you see it?