01 - Place butter in a medium saucepan over medium heat. Cook, stirring constantly, until butter foams and develops a golden-brown color with a nutty aroma, approximately 4-6 minutes. Immediately transfer to a large mixing bowl and cool for 10 minutes.
02 - Add brown sugar and granulated sugar to the cooled brown butter. Whisk until thoroughly combined. Stir in eggs and vanilla extract, mixing until smooth and fully incorporated.
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. Fold in oats, grated carrots, walnuts or pecans, and raisins if using.
05 - Cover dough and refrigerate for 30 minutes to enhance chewiness. This step is optional but recommended for best texture.
06 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
07 - Scoop dough into 2-tablespoon balls, placing them 2 inches apart on prepared baking sheets.
08 - Bake for 11-13 minutes, until edges are set and centers appear slightly underbaked. Cool on baking sheet for 5 minutes, then transfer to wire rack to cool completely.
09 - Beat softened cream cheese and butter together until smooth. Add powdered sugar and vanilla extract, continuing to beat until creamy and well combined. Drizzle over cooled cookies.