Prepare an 9 by 9 inch pan with parchment paper and preheat an oven to 180c (350f).
Into a large mixing bowl, add the eggs, vegetable oil, melted butter, kosher salt, cinnamon, nutmeg, sugar, brown sugar, and vanilla extract. Mix with a whisk until well combined.
Add the grated carrots and mix with a whisk until well combined.
Add the flour and baking soda and mix until just combined and there are no patches of flour visible.
Pour the cake batter to the prepared 9 by 9 baking pan, and bake in a 180(350f) preheated oven for 30-40 minutes or until the top is golden brown and a toothpick inserted into the cake comes out clean. Let it cool completely.
Make the cream cheese frosting
Into a large bowl add room temperature butter and mix with a hand mixer or a stand mixer until the butter is light and fluffy.
Add the cream cheese and mix until smooth. Then add ½ of the powdered sugar at a time (you don’t want to be in a powdered sugar cloud).
Add a pinch of salt, and the vanilla extract and mix well until smooth.
Top the cake with the cream cheese frosting and make a wave pattern with an offset spatula. Top the cake with chopped walnuts or hazelnuts. Enjoy!
Notes
Use room temperature ingredients. It is important that you use room-temperature ingredients like eggs, cream cheese, and butter. This step ensures that your mixture mixes into a homogenous mixture and bakes perfectly. you don’t want to place cold batter into the oven.
Measure your flour correctly! When measuring your flour, avoid scooping it with a measuring cup. Instead, stir the flour with a spoon to create as many air pockets as possible, and spoon it into your measuring cup. Finally, level it with a back of a knife.
Don’t overmix the batter, you don’t want to develop the gluten in the flour. This step ensures you have a moist cake and not a dense and dry cake.
Line your baking pan with parchment paper! This step helps the cake to bake evenly, and it makes sure that your cake will release easily from the pan.
Be patient! I know it’s extremely tempting to frost this cake as soon as it's ready. Allow the cake to cool to room temperature before frosting cake. This step prevents the frosting to melt.