Step 1: Preheat Oven : Preheat oven to 350°F (175°C). Line a 12-cup muffin tin with paper liners or lightly grease it.
Step 2: Mix Dry Ingredients : In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, and nutmeg.
Step 3: Mix Wet Ingredients : In a large bowl, whisk together vegetable oil, granulated sugar, eggs, and vanilla extract until smooth.
Step 4: Combine Wet and Dry Ingredients : Gradually fold dry ingredients into the wet mixture until just combined. Do not overmix.
Step 5: Add Carrots, Pineapple, and Nuts : Fold in grated carrots, crushed pineapple, and nuts (if using) until evenly distributed.
Step 6: Fill Muffin Cups : Divide the batter evenly among the 12 muffin cups, filling each about 2/3 full.
Step 7: Bake : Bake for 20-25 minutes or until a toothpick inserted into the center comes out clean. Allow muffins to cool in the pan for 5 minutes, then transfer to a wire rack.
Step 8: Prepare Cream Cheese Drizzle : In a small bowl, whisk together softened cream cheese, powdered sugar, milk, and vanilla extract until smooth. Adjust consistency with more milk if needed.
Step 9: Drizzle Over Muffins : Drizzle cream cheese mixture over cooled muffins and allow it to set slightly before serving.