01 - Place butter in a medium saucepan over medium heat. Cook, stirring constantly, until butter foams and develops golden-brown specks with a nutty aroma, approximately 4–6 minutes. Immediately transfer to a large mixing bowl and allow to cool for 10 minutes.
02 - Add brown sugar and granulated sugar to the cooled brown butter. Whisk vigorously until thoroughly combined. Stir in eggs one at a time, followed by vanilla extract, mixing until smooth and glossy.
03 - In a separate bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, nutmeg, and ginger until evenly distributed.
04 - Gradually add dry ingredients to the wet mixture, stirring gently until just combined. Avoid overmixing to prevent tough cookies.
05 - Fold in oats, grated carrots, walnuts or pecans, and raisins if using, until evenly distributed throughout the dough.
06 - Cover bowl and refrigerate dough for 30 minutes. This step is recommended for chewier texture and prevents excessive spreading during baking.
07 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
08 - Scoop dough into 2-tablespoon portions, rolling into balls. Arrange on prepared baking sheets, spacing 2 inches apart to allow for spreading.
09 - Bake for 11–13 minutes, until edges appear set and centers look slightly underbaked. This ensures a soft, chewy texture.
10 - Let cookies rest on baking sheets for 5 minutes, then transfer to wire rack to cool completely. For glazed cookies, beat softened cream cheese and butter with powdered sugar and vanilla until smooth, then drizzle over cooled cookies.