A few years ago I tried making chocolate chip cookies. "Tried" being the operative word. What I wound up with, repeatedly, was dough that looked good to me but when baked would spread out way thin and just be a mess.
Today I did bit of a web search and found a few hints about what might have caused that and what to do about it. I made chocolate chip cookies this morning and they pretty much turned out. It wasn't a perfect run, but it was much, much better than anything before.
What had been going wrong? Maybe a few things. I probably wasn't beating the egg/sugar/vanilla mix enough and thus not dissolving the sugar(s) properly. I wasn't keeping the cookie sheet(s) well away from the stove until baking time (the stovetop being a convenient flat surface in a small kitchen with a very cluttered table). And I wasn't baking on the top rack in the oven.
What went wrong today? The cookies I didn't bake on the top rack either should have waited for the top rack or had (even) more baking time. It wouldn't have hurt to refrigerate the dough for a few minutes before shaping/making the cookies. Smaller spoonfuls and/or more spacing would be a Good Idea. And I went way overboard on the chocolate chips so in places there's more chocolate chip than cookie.
Still, the cookies came out cookie shaped this time. The rest is down to tweaking, I think. Trying the tweaks won't happen soon as I don't plan on baking cookies all that often.