01 - Preheat oven to 350°F. Line two baking sheets with parchment paper.
02 - In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
03 - In a large bowl, beat butter, granulated sugar, and brown sugar until creamy and fluffy, about 2 to 3 minutes.
04 - Add the egg and vanilla extract to the butter mixture, mixing until well combined.
05 - Gradually mix dry ingredients into the wet ingredients until just combined.
06 - Fold in grated carrots, oats, walnuts or pecans if using, and raisins if using.
07 - Using a tablespoon or small cookie scoop, drop dough onto prepared baking sheets about 2 inches apart.
08 - Bake 11 to 13 minutes, or until edges are golden and centers are set. Let cool on the baking sheet for 5 minutes, then transfer to a wire rack to cool completely.
09 - Beat cream cheese, powdered sugar, milk, and vanilla together until smooth. Drizzle over cooled cookies using a spoon or small piping bag. Allow glaze to set before serving.