There could be several reasons for this. Your butter might have been too soft or melted, the dough might not have been chilled long enough, or there could have been too much sugar. Always ensure your butter is at room temperature (not melted), and if your kitchen is warm, consider chilling the dough for 30 minutes before baking. I also like to have one of these baking mats when making cookies. I feel like it keeps them from spreading too much.