Combine softened butter with brown sugar and sugar in a medium-sized bowl. Beat on medium speed with an electric hand mixer for about 1 minute or until the ingredients are well combined.
Add the egg yolk and vanilla and beat until the ingredients are well mixed.
In a separate small bowl, stir together the flour, baking soda, cornstarch, and salt.
Slowly add the dry ingredients to the cookie dough batter. Mix on low speed until the dough starts to form.
Fold in the M&Ms.
Line a baking sheet or a cookie sheet with parchment paper or use a silicone baking sheet. Scoop the dough into approximately 2 to 3-tablespoon portions and place them on the baking sheet about 2 inches apart. Roll the dough into balls.
Bake for 8 to 10 minutes or until the edges are very lightly browned.
Allow the cookies to cool on the baking sheet for 5 minutes before transferring them to a wire rack to cool completely.
Notes
Expert Tips
Measure the flour correctly: Use a spoon to scoop flour into a measuring cup made for dry ingredients and slightly overfill it. Then, use the back of a knife or other straight-edged utensil to level the flour across the cup. Do not scoop the flour. When you scoop, the flour gets packed too tightly and you will end up with more than the recipe calls for.
The best way to soften butter is to put it out on the kitchen counter for a half hour before you want to use it.
Line the baking sheet: Use a silicone mat or parchment paper to line your baking or cookie sheet. I don't recommend coating your baking sheet with butter or oil spray because it creates an overly greasy sheet that will make your cookies spread.
Make photo-worthy cookies: A secret to making beautiful M&M cookies that are loaded with M&M candies is to press a few of the M&Ms into the tops of the balls of cookie dough right before baking. I usually do this when I'm bringing a small batch of these cookies to a friend or neighbor.