Preheat and Prepare Your Muffin Tin. Preheat your oven to 350°F. Grease your muffin tin with non-stick spray or line with paper muffin liners to make clean-up easier.
Prepare the Dry Ingredients. In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, and nutmeg. This ensures that the spices and leavening agents are evenly distributed throughout the batter.
Mix the Wet Ingredients. In a separate large bowl, whisk together the brown sugar, egg, vegetable oil, and vanilla extract. Mix until smooth and well combined. Add the freshly grated carrots to the wet mixture and stir to combine. If you're adding walnuts or raisins, fold them in now.
Combine Wet and Dry Ingredients. Slowly add the dry ingredients to the wet mixture, stirring gently until just combined. Be careful not to overmix. This could result in dense muffins.
Fill the Muffin Tin. Scoop the batter into the muffin tin, filling each cup about ⅔ of the way full. This will give the muffins room to rise without overflowing.
Bake to Perfection. Place the muffin tin in the preheated oven and bake for 18-20 minutes. The muffins are done when a toothpick inserted into the center comes out clean. Let the muffins cool in the pan for about 5 minutes, then transfer them to a wire rack to cool completely.
Frost. If you want to add a creamy touch to your carrot muffins, make the cream cheese frosting. In a small bowl, beat together the cream cheese, butter, vanilla extract, and powdered sugar until smooth and fluffy. Spread a generous amount of frosting on each muffin once they have cooled.