Preheat your oven to 350 degrees F. This is a crucial first step, as it ensures that your cookies bake evenly. Make sure your oven is fully heated before you put the cookies in.
In a mixing bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, ginger, and nutmeg for about 20 seconds. This step helps to evenly distribute the leavening agents and spices throughout the flour.
In the bowl of an electric stand mixer fitted with the paddle attachment, blend together the unsalted butter, granulated sugar, and brown sugar until creamy. This should take about 2 to 3 minutes. The mixture should be light in color and fluffy in texture.
Blend in the egg and vanilla extract, mixing until just combined. The mixture will become a bit more fluid as you incorporate these ingredients.
With the mixer set on low speed, add half of the flour mixture and mix just until combined. Avoid overmixing, as this can lead to tough cookies.
Now, mix in the finely grated carrots. Their moisture will help keep the cookies soft and chewy.
Finally, mix in the remaining half of the flour mixture just until combined. Scrape the sides and bottom of the bowl with a spatula to ensure everything is well incorporated.
Scoop the dough out with a medium 1 1/2 Tbsp cookie scoop and drop it onto baking sheets lined with silicone liners. Make sure to space the cookies about 2 inches apart to allow for spreading during baking.
Bake in the preheated oven until the cookies are set but still soft to the touch, about 11 to 12 minutes. Keep an eye on them; they should be lightly golden around the edges.
Cool the cookies on the baking sheet for several minutes before transferring them to a wire rack. Let them cool completely in an airtight container so they don’t dry out.
While the cookies cool, prepare the frosting. In a mixing bowl fitted with the paddle attachment, whip together the butter and cream cheese until light and fluffy. This should take about 3 minutes.
Mix in the vanilla extract and powdered sugar, whipping again until light and fluffy. If the frosting is too runny, chill it in the freezer for about 5 minutes, then whip one last time.
If you’d like to create decorative carrots, set aside about 2 Tbsp of the frosting to tint green and 2 Tbsp to tint orange. Use decorative piping tips for a fun finishing touch.