01 - Place butter in a medium saucepan over medium heat. Cook while stirring until the butter foams, develops a golden-brown color, and releases 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 thoroughly to combine. Incorporate eggs and 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 the dry ingredient mixture to the wet ingredients. Stir until just combined, being careful not to overmix.
05 - Fold in rolled oats, grated carrots, chopped walnuts or pecans, and raisins if using until evenly distributed throughout the dough.
06 - Cover the bowl and refrigerate for 30 minutes to enhance chewiness. This step is optional but highly recommended for optimal texture.
07 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
08 - Scoop dough into 2-tablespoon sized balls, arranging them on prepared baking sheets approximately 2 inches apart.
09 - Bake for 11–13 minutes until edges are set but centers appear slightly underbaked. Allow cookies to cool on the baking sheet for 5 minutes before transferring to a wire rack.
10 - Beat softened cream cheese and butter together. Add powdered sugar and vanilla extract, mixing until smooth. Drizzle over completely cooled cookies.