What does cornstarch do in cookies?

Cornstarch binds the ingredients and provides additional structure, leading to less spreading. This results in a thicker, chewier cookie that isn’t too dense.