Preheat your oven to 350°F (175°C). Grease and flour an 8x8-inch baking pan or line it with parchment paper.
In a large bowl, whisk together eggs, oil, sugar, and vanilla until well combined. Add the crushed pineapple or applesauce for extra moisture.
In a separate bowl, whisk together flour, baking soda, baking powder, salt, cinnamon, and nutmeg. Gradually mix into the wet ingredients until just combined.
Gently stir in the grated carrots and optional nuts. Don’t overmix — just enough to distribute evenly.
Pour the batter into the prepared pan and bake for 30–35 minutes or until a toothpick inserted in the center comes out clean. Let it cool completely before frosting.
Mix 4 oz cream cheese, 2 tbsp butter, 1 cup powdered sugar, and ½ tsp vanilla until smooth. Spread over the cooled cake for the perfect finishing touch.