In a large mixing bowl, beat the softened butter, brown sugar, and granulated sugar until light, creamy, and fluffy.
Add the eggs one at a time, beating well after each addition. Mix in the vanilla extract.
Add the all-purpose flour, baking soda, and salt. Stir with a spatula until a soft cookie dough forms.
Fold in the M&M candies until evenly mixed throughout the dough.
Cover the dough and chill it in the refrigerator for 30 minutes.
Preheat the oven to 350°F (180°C). Lightly grease a baking sheet or line it with parchment paper.
Scoop spoonfuls of cookie dough onto the prepared baking sheet, spacing them about 2 inches apart.
Bake for 11 minutes, or until the edges are lightly golden and the centers still look slightly soft.
Remove the cookies from the oven and let them cool on the baking sheet for a few minutes.
Transfer the cookies to a wire rack and cool completely before serving.