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 - Add brown sugar and granulated sugar to the cooled brown butter. Whisk vigorously until fully combined and mixture is smooth. Stir in eggs one at a time, then add vanilla extract, mixing until incorporated.
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 the wet mixture. Stir with a spatula or wooden spoon until just combined—do not overmix. The dough will be thick and slightly sticky.
05 - Gently fold in oats, grated carrots, walnuts or pecans, and raisins if using, until evenly distributed throughout the dough.
06 - Cover bowl with plastic wrap and refrigerate for 30 minutes. This step prevents excessive spreading and produces chewier cookies with better texture.
07 - Preheat oven to 350°F. Line two large baking sheets with parchment paper.
08 - Scoop chilled dough into 2-tablespoon portions, rolling into balls. Arrange on prepared baking sheets, spacing 2 inches apart to allow for spreading.
09 - Bake for 11–13 minutes, rotating pans halfway through, until edges are set and lightly golden but centers still appear slightly underbaked. Remove from oven.
10 - Let cookies cool on baking sheet for 5 minutes to set, then transfer to wire rack to cool completely. Meanwhile, beat softened cream cheese and butter with powdered sugar and vanilla until smooth. Drizzle glaze over cooled cookies just before serving.