01 - Place butter in a medium saucepan over medium heat. Cook, stirring constantly, until butter foams and begins to brown and smell nutty, about 4–6 minutes. Immediately pour into a large mixing bowl and let cool for 10 minutes.
02 - Add brown sugar and granulated sugar to the cooled brown butter; whisk until well combined. Stir in eggs and vanilla extract until mixture is smooth and creamy.
03 - In a separate bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, nutmeg, and ginger until evenly distributed.
04 - Add dry ingredients to the wet mixture and stir until just combined. Do not overmix.
05 - Gently 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 for chewier cookies. This step is optional but highly recommended for best texture.
07 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
08 - Scoop dough into 2-tablespoon balls, placing them 2 inches apart on prepared baking sheets.
09 - Bake for 11–13 minutes, until edges are set and centers look slightly underbaked. Let cool on baking sheet for 5 minutes, then transfer to wire rack to cool completely.
10 - Beat softened cream cheese and butter with powdered sugar and vanilla extract until smooth and creamy. Drizzle over cooled cookies if desired.