Using a lower amount of flour is usually the key to making a cookie soft and chewy instead of cakey. It also helps to give the cookies a great texture if you firmly tap the pan on the counter right after they come out of the oven. This deflates the cookies and compresses the centers to help the centers to be chewy and the edges to be crispy. For more details on all the factors that affect the texture of cookies, check out the “What Causes Cakey Cookies” section in this Chocolate Chip Cookie Recipe.