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. Immediately transfer to a large mixing bowl and cool for 10 minutes.
02 - Whisk brown sugar and granulated sugar into the cooled brown butter until fully combined. Stir in eggs one at a time, then add vanilla extract, mixing until smooth and glossy.
03 - In a separate medium bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, nutmeg, and ginger until evenly distributed.
04 - Add dry ingredients to wet mixture and stir with a spatula until just combined—do not overmix. Fold in oats, grated carrots, walnuts, and raisins if using.
05 - Cover bowl and refrigerate for 30 minutes to enhance chewiness and prevent overspreading during baking.
06 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
07 - Scoop dough into 2-tablespoon balls, spacing 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, mixing until creamy and lump-free. Drizzle over completely cooled cookies.