Brown the butter:
In a light-colored saucepan, melt the butter over medium heat. Stir continuously until golden brown bits form and it smells nutty. Remove from heat and cool for 10 minutes.
Mix wet ingredients:
In a large bowl, whisk together the browned butter, brown sugar, and granulated sugar until smooth. Add the pumpkin purée, vanilla, and egg yolk. Whisk until creamy.
Mix dry ingredients:
In another bowl, combine flour, baking soda, salt, cinnamon, and nutmeg.
Combine:
Add the dry mixture to the wet ingredients, stirring gently until combined. Fold in chocolate chips or chunks.
Chill:
Refrigerate dough for at least 30–45 minutes for best texture and flavor.
Bake:
Preheat oven to 350°F (175°C). Line a baking sheet with parchment paper. Scoop dough (about 2 tablespoons per cookie) and place 2 inches apart. Bake 10–12 minutes, or until the edges are golden and centers soft.
Cool and serve:
Let cookies rest on the sheet for 5 minutes before transferring to a wire rack. Sprinkle with flaky sea salt if desired.