Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans. Peel and finely grate your carrots — you want them nice and fluffy for a moist cake.
In a large bowl, whisk together the flour, baking soda, baking powder, salt, cinnamon, and nutmeg until well combined. This ensures even distribution of the leavening agents.
In another bowl, beat together the oil, sugar, eggs, and vanilla extract until smooth and slightly thickened. The mixture should look glossy and well combined.
Gradually add the dry ingredients to the wet mixture, stirring until just combined. Fold in the grated carrots and chopped walnuts if using. Don't overmix — a few lumps are okay!
Divide the batter evenly between your prepared pans. Bake for 30-35 minutes, or until a toothpick inserted in the center comes out clean. Let cool in pans for 10 minutes, then turn out onto wire racks to cool completely.
Beat the softened cream cheese and butter together until fluffy. Add the powdered sugar gradually, then mix in the vanilla. Beat on high for 2-3 minutes until light and spreadable.
Place one cake layer on your serving plate. Spread about 1 cup of frosting on top. Add the second layer and frost the top and sides generously. For a party look, top with extra walnuts or a sprinkle of cinnamon!