How Do I Make A Cookie Cake

How Do I Make A Cookie Cake / Pressing the dough into a pan, rather than freehand it on a baking sheet how does the cookie cake stay soft and moist?