Stacking food creates the dimension of height. In the case of these cookies it was quite simple. One cookie right on top of the bottom one until you have the desired height.
The hero cookie that is up front has almost no chips in the back of the cookie. The image in the middle is just displaying lots of chips, which everyone loves.