Brown the butter: Add the butter to a light-colored saucepan over medium heat. Melt, then cook, stirring often, until it foams, smells nutty, and brown bits form on the bottom, 5–7 minutes.
Scrape everything into a heatproof bowl and let cool 20–25 minutes until just warm, not hot.
Whisk sugars and butter: Add dark brown sugar and granulated sugar to the cooled brown butter. Whisk until glossy and combined, about 1 minute.
Add eggs and vanilla: Whisk in the eggs one at a time until the mixture thickens and lightens slightly, then stir in vanilla. The batter should look smooth and shiny.
Combine dry ingredients: In a separate bowl, whisk flour, baking soda, kosher salt, cinnamon, and nutmeg.
Bring it together: Use a spatula to fold the dry ingredients into the wet mixture just until a few flour streaks remain.
Add chopped chocolate and chips (and nuts or M&M’s if using). Fold gently until evenly distributed. Do not overmix.
Chill the dough: Cover and refrigerate at least 1 hour, or up to 48 hours. Chilled dough spreads less and bakes up thicker and chewier.
Preheat and prep: Heat the oven to 350°F (175°C).
Line baking sheets with parchment paper.
Scoop: Use a 2-tablespoon scoop for standard cookies or 3 tablespoons for bakery-style. Space scoops 2–3 inches apart. Press a few extra chocolate pieces on top for a bakery look.
Bake: Bake 10–12 minutes (standard) or 12–14 minutes (larger) until edges are set and lightly golden but centers still look soft.
Rotate pans halfway through for even baking.
Finish: Right out of the oven, tap the pan once on the counter to settle the cookies. Sprinkle with flaky sea salt. Let rest on the sheet 5 minutes, then transfer to a rack to cool.