If your ratios of flour, butter and sugar off, the cookie might spread too quickly. Sugar sucks up liquid, and when those cookies bake, it'll release the liquid and cause the cookies to spread out. If you use too much butter, the cookies will end up flat and greasy.
Can you fix flat cookie dough?
Mistake: When cookies turn out flat, the bad guy is often butter that is too soft or even melted. How to Fix it: If too-soft butter was the culprit, try refrigerating cookie dough for 1 to 2 hours before baking. If too-little flour was the issue, try adding an additional 1 to 2 tablespoons of flour to the dough.