Preheat and Prepare: Preheat oven to 375°F for 10 minutes. Line two large baking sheets with parchment paper. Checkpoint: Your oven rack should be in the middle position and the oven should be fully heated.
Combine Dry Ingredients: In a small bowl, whisk together 2 1/4 cups all-purpose flour, 1 teaspoon baking soda, and 1 teaspoon salt. Set aside. Checkpoint: The mixture should look uniform and sandy in color.
Cream Butter and Sugars: In a large mixing bowl, add 1 cup softened unsalted butter, 3/4 cup granulated sugar, and 3/4 cup packed brown sugar. Using an electric mixer on medium speed, beat for 3–4 minutes until the mixture is light, fluffy, and pale in color. It should look like thick frosting. Checkpoint: The mixture should increase in volume by about 50% and be noticeably lighter in color.
Add Eggs and Vanilla: Add 2 large eggs one at a time to the butter mixture, beating well after each addition (about 30 seconds each). This takes 1–2 minutes total. Then add 2 teaspoons vanilla extract and beat for another 30 seconds. Checkpoint: The mixture should be smooth and creamy with no visible egg streaks.
Combine Wet and Dry: Add the flour mixture to the butter mixture in two additions, stirring gently with a wooden spoon or mixer on low speed until just combined. This takes about 1–2 minutes. Do not overmix. Checkpoint: You should see no white streaks of flour, and the dough should come together into a soft ball.
Fold in Mix-Ins: Using a rubber spatula or wooden spoon, gently fold 2 cups semi-sweet chocolate chips, 1 cup M&M candies, and 1/2 cup chopped nuts (if using) into the dough. Fold until evenly distributed. This takes about 1–2 minutes. Checkpoint: M&Ms and chocolate chips should be visible throughout the dough with no pockets of flour remaining.
Scoop Dough: Using a cookie scoop or rounded tablespoon, place dough balls onto prepared baking sheets, spacing them about 2 inches apart. You should have about 24 cookies. Checkpoint: Cookies should be evenly sized and not touching each other.
Add Candy Topping: Before baking, gently press 3–4 reserved M&M candies into the top of each cookie dough ball, pressing lightly so they stick but don't sink into the dough. This takes 2–3 minutes. Checkpoint: Each cookie should have colorful M&Ms visible on top.
Bake First Batch: Place baking sheet in preheated 375°F oven. Bake for 9–11 minutes. Cookies are done when the edges are golden brown but the center still looks slightly underbaked and soft. The tops may look almost wet in the very center—this is correct. Checkpoint: Edges should be firm and golden; centers should jiggle slightly when you gently shake the pan.
Cool on Sheets: Remove from oven and let cookies cool on the baking sheet for 2 minutes. They will continue to cook from residual heat during this time. Checkpoint: Cookies should be set enough to move without breaking but still warm.
Transfer to Rack: Using a thin spatula, carefully transfer cookies to a wire cooling rack. Cool completely, about 15–20 minutes. Checkpoint: Cookies should be completely set and at room temperature before storing.
Repeat with Second Batch: If you have remaining dough, allow the baking sheet to cool for 2–3 minutes, re-line with fresh parchment paper, and repeat steps 7–10.