More than one factor determines whether your chocolate chip cookies will be thick or flat. Among them is the ratio between sugar and flour.  To keep your cookies thick, use a lower ratio of sugar to flour. Cooling or freezing them before baking also helps the cookies to spread less or flatten.