Preheat and Prepare Pan
Preheat your oven to 350°F (175°C). Grease a 9x5-inch loaf pan or a bundt pan. Line with parchment paper for easy removal.
Mix Dry Ingredients
In a large bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
Whisk Wet Ingredients
In another bowl, beat together the eggs, brown sugar, granulated sugar, oil, and vanilla extract until well combined.
Add Carrots and Nuts
Fold in the grated carrots and, if using, the chopped nuts.
Combine Wet and Dry Mixtures
Gently add the dry mixture to the wet mixture. Stir until just combined—avoid overmixing.
Bake
Pour the batter into the prepared pan and smooth the top. Bake for 55–65 minutes, or until a toothpick inserted into the center comes out clean.
Cool the Cake
Allow the cake to cool in the pan for 10–15 minutes, then transfer to a wire rack to cool completely.
Prepare the Vanilla Glaze
In a small bowl, mix the powdered sugar, milk, and vanilla extract until smooth and pourable.
Glaze and Serve
Drizzle the glaze generously over the cooled cake. Let it set for 15–20 minutes before slicing.