01 - Preheat oven to 350°F and line two baking sheets with parchment paper.
02 - Beat butter, brown sugar, and granulated sugar in a large bowl until light and fluffy, about 2-3 minutes.
03 - Beat in eggs one at a time, then add vanilla extract, mixing until fully combined.
04 - Whisk together flour, baking powder, baking soda, salt, cinnamon, and nutmeg in a separate bowl.
05 - Gradually add dry ingredients to wet mixture, mixing just until combined. Do not overmix.
06 - Fold in grated carrots and nuts (if using) until evenly distributed throughout the dough.
07 - Drop 3-tablespoon mounds of dough onto prepared baking sheets, spacing at least 2 inches apart.
08 - Bake for 12-14 minutes until edges are golden and centers are set. Cool on sheet for 5 minutes, then transfer to wire rack.
09 - Beat cream cheese and butter until smooth and creamy. Gradually add powdered sugar, vanilla, and salt, beating until fluffy.
10 - Once cookies are completely cool, generously frost each with cream cheese frosting. Garnish with chopped nuts if desired.