Prep the basics: Heat oven to 350°F (175°C). Line a 12-cup muffin pan with liners. Lightly mist with spray if your liners tend to stick.
Whisk dry ingredients: In a large bowl, whisk flour, baking powder, baking soda, salt, cinnamon, ginger, and nutmeg until evenly combined.
Mix wet ingredients: In another bowl, whisk eggs, granulated sugar, brown sugar, oil, applesauce, and vanilla until smooth.
Combine: Add wet ingredients to dry.
Stir gently until you no longer see dry streaks. Fold in grated carrots and nuts/raisins if using. Do not overmix.
Fill and bake: Divide batter evenly among liners, about 3/4 full.
Bake 18–22 minutes, until a toothpick comes out clean and tops spring back lightly.
Cool completely: Let cupcakes cool in the pan 5 minutes, then transfer to a rack to cool fully before frosting.
Brown the butter: In a light-colored saucepan, melt the butter over medium heat. Cook, stirring, until it foams, turns golden, and smells nutty, with brown bits on the bottom. Remove from heat and pour into a bowl.
Chill until just cool and slightly firm but still pliable.
Make the frosting: Beat cream cheese until smooth. Add the cooled browned butter and beat until fluffy. Gradually add powdered sugar, vanilla, and a pinch of salt.
If needed, add a splash of milk or cream until spreadable.
Frost: Swirl the frosting onto cooled cupcakes with a spatula or pipe with a large round or star tip. Garnish with chopped nuts or a light sprinkle of cinnamon if you like.