Preheat the oven to 350°F (175°C). Line two baking sheets with parchment paper or silicone baking mats.
Whisk together the flour, baking soda, and salt in a medium bowl.
In a large mixing bowl, beat the softened butter, granulated sugar, and brown sugar until light and creamy, about 2 to 3 minutes.
Add the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
Gradually add the dry ingredients and mix just until the flour is incorporated. Do not overmix.
Gently fold in the M&M candies and optional mini chocolate chips.
Scoop the dough onto the prepared baking sheets, leaving about 2 inches between each cookie.
Press a few extra M&Ms onto the tops if desired.
Bake for 9 to 12 minutes, or until the edges are lightly golden and the centers still look slightly soft.
Let the cookies cool on the baking sheet for about 5 minutes, then transfer them to a wire rack