Preheat your oven to 350°F and line a baking sheet with parchment paper or a silicone mat. While the oven heats, finely shred your carrots using a box grater or food processor, then measure out 1.5 cups and set aside. Sift together the flour, baking soda, salt, cinnamon, and nutmeg in a medium bowl, whisking to combine and aerate the dry ingredients evenly.
In a large mixing bowl, combine the room temperature butter, sugar, and brown sugar. Using an electric mixer on medium speed, beat for 2-3 minutes until the mixture is light, fluffy, and pale in color—this aerates the dough and helps create tender cookies. I find that properly creamed butter creates a noticeably lighter texture in the final cookie, so don't skip this step.
Add the vanilla and eggs to the creamed butter mixture one at a time, mixing well after each addition until fully incorporated. Fold in the shredded carrots using a spatula until evenly distributed throughout the wet mixture. Working quickly, gently fold the dry ingredient mixture from Step 1 into the wet ingredients until just combined—do not overmix, as this can develop gluten and make the cookies tough.
Using a 2-tablespoon cookie scoop or spoon, drop rounded portions of dough onto your prepared baking sheet, spacing them 2-3 inches apart to allow for spreading. Bake at 350°F for 10-12 minutes, until the edges are lightly golden but the centers still look slightly underbaked. Let the cookies cool on the baking sheet for 5 minutes to set, then transfer to a wire rack to cool completely before frosting.
While the cookies cool, melt the 5 tablespoons of butter in a small saucepan over medium heat. Continue cooking for 2-4 minutes, swirling occasionally, until the butter turns golden brown and develops a nutty aroma—watch carefully as it can burn quickly. Pour the brown butter into a bowl and let it cool for 2-3 minutes until just warm, then add the softened cream cheese and whisk until smooth and combined.
Add the sifted powdered sugar, vanilla, and milk to the brown butter and cream cheese mixture from Step 5. Whisk until you reach a spreadable consistency—if it's too thick, add milk a teaspoon at a time; if too thin, add more powdered sugar. I like to make sure the frosting is completely smooth before applying it, so I give it an extra minute of whisking. Spread or pipe the frosting onto the completely cooled cookies and serve.