I start by beating the softened butter with the granulated sugar and brown sugar until the mixture turns pale and fluffy, which usually takes about three minutes. This step traps air in the dough, which is part of what gives the finished cookies their soft texture. I scrape down the sides of the bowl once or twice so everything blends evenly.
Next, I crack in the eggs one at a time, mixing well after each addition so the batter stays smooth. Then I pour in the vanilla extract and mix just until it's fully combined. I avoid overmixing here since too much air at this stage can make the cookies spread oddly in the oven.
In a separate bowl, I whisk together the flour, baking soda, baking powder, and salt so they're evenly distributed. I add this dry mixture to the wet ingredients in two batches, stirring on low speed until just combined. Overmixing at this point is the easiest way to end up with tough, dense cookies.
Once the dough comes together, I gently fold in most of the M&M's and the chocolate chips if I'm using them, saving a small handful of candies to press on top later. I like to fold by hand with a spatula so the candies don't crack or lose their coating. This also keeps the dough from getting overworked.
I cover the bowl and pop it in the fridge for about 30 minutes before baking. Chilling firms up the butter so the cookies hold their shape instead of spreading thin, and it also deepens the flavor slightly. If I'm short on time, even 20 minutes in the freezer works in a pinch.
I preheat my oven to 350°F and line my baking sheet with parchment paper. Using my cookie scoop, I portion out the dough, press a few reserved M&M's on top of each ball, and space them about two inches apart. They bake for 9 to 11 minutes, until the edges look set but the centers still look slightly underdone.
I let the cookies rest on the baking sheet for about five minutes before moving them to a wire rack. This short rest lets them finish setting so they don't fall apart when I transfer them. Once they're fully cool, they're ready to serve, package, or stack onto a holiday platter.