01 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
02 - Whisk together flour, cinnamon, nutmeg, baking soda, and salt in a medium bowl. Set aside.
03 - Beat butter, brown sugar, and granulated sugar in a large bowl until light and fluffy. Add egg and vanilla extract; mix until combined.
04 - Gradually add dry ingredients to wet ingredients, mixing just until incorporated.
05 - Fold in grated carrots, oats, walnuts or pecans, and raisins until evenly distributed.
06 - Drop rounded tablespoons of dough onto prepared baking sheets, spacing about 2 inches apart.
07 - Bake 11 to 13 minutes or until edges are set and tops look dry. Cool on baking sheets for 5 minutes, then transfer to wire rack to cool completely.
08 - Beat cream cheese and butter until smooth. Add powdered sugar and vanilla; beat until fluffy.
09 - Once cookies are completely cool, spread or pipe frosting onto each cookie. Optionally sprinkle with extra chopped nuts.