Preheat your oven to 350°F (175°C) to ensure even baking.
Line your baking sheet with parchment paper to prevent sticking.
In a medium bowl, whisk together the all-purpose flour, baking soda, and kosher salt.
In a large mixing bowl, cream the unsalted butter, light brown sugar, and granulated sugar until light and fluffy, about 2-3 minutes.
Add the egg and vanilla extract to the butter-sugar mixture and mix until fully combined.
Gradually add the dry ingredients to the wet mixture, mixing on low speed until just combined.
Fold in the M&M candies (and chocolate chips if using) with a spatula.
Drop rounded portions of dough onto the prepared baking sheet, leaving space for spreading.
Bake for 10-12 minutes until edges are lightly golden and centers look slightly underbaked.
Allow cookies to cool on the baking sheet for 5 minutes, then transfer them to a wire rack to cool completely.