This can happen for a few reasons. The most common ones are you didn't measure your flour correctly and added too much flour. And the second one is that you baked your cookies for too long. I always love underbaking my cookies by a little bit to keep them chewy on the inside. Cookies keep baking in the cooling process, so I pull them out a minute or two before the baking time ends.