Preheat the oven to 350°F (175°C). Line an 8-inch square pan or two 8-inch round pans with parchment and lightly grease.
In a large bowl, whisk the flour, sugars, baking powder, baking soda, salt, and spices until no lumps remain.
In a separate bowl or measuring jug, combine applesauce, oil, dairy-free milk, vanilla, and vinegar.
Pour wet into dry and mix with a spatula until just combined. Do not overmix.
Fold in the grated carrots and any optional add-ins.
The batter will be thick—this is right.
Spread batter into the prepared pan(s). Smooth the top with a spatula.
Bake for 30–36 minutes (round layers may finish closer to 28–32). A toothpick should come out mostly clean with a few moist crumbs.
Cool in the pan for 10 minutes, then transfer to a wire rack to cool completely before frosting.
Make the frosting: Beat vegan butter until creamy.
Add vegan cream cheese and beat just until smooth. Mix in vanilla and salt, then gradually add powdered sugar to reach a spreadable consistency.
Frost the cooled cake. For layered cakes, add frosting between layers and on top.
Garnish with chopped nuts if you like.