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, about 4–6 minutes. Pour immediately into a large mixing bowl and cool for 10 minutes.
02 - Add brown sugar and granulated sugar to the cooled brown butter. Whisk vigorously until well combined. Stir in eggs one at a time, followed by vanilla extract, mixing until completely smooth.
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. Stir with a spatula or wooden spoon until just combined—do not overmix. Fold in oats, grated carrots, walnuts or pecans, and raisins if using.
05 - Cover bowl and refrigerate for 30 minutes. This step is optional but recommended for chewier, more flavorful cookies.
06 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
07 - Scoop dough into 2-tablespoon portions, rolling into balls. Place on prepared baking sheets about 2 inches apart.
08 - Bake for 11–13 minutes, until edges are set and centers look slightly underdone. Remove from oven.
09 - Let cookies cool on baking sheet for 5 minutes, then transfer to a wire rack to cool completely.
10 - Beat softened cream cheese and butter together until smooth. Add powdered sugar and vanilla, mixing until creamy. Drizzle over cooled cookies.