Preheat an oven. Grease a baking dish with butter and flour or nonstick baking spray. Set aside. Place granulated sugar, brown sugar, vegetable oil, eggs, and vanilla extract in the bowl of a stand mixer. Beat on medium speed until thoroughly mixed.
Add all-purpose flour, baking soda, baking powder, ground cinnamon, and Kosher salt, then beat until just combined. Stir in grated carrots and chopped walnuts until just combined.
Pour into the prepared baking dish, then use a spatula to smooth into an even layer. Bake until a toothpick inserted into the center of the cake comes out clean. Cool, then carefully invert onto a wire rack. Cool completely before icing.
Place butter and cream cheese in the bowl of a stand mixer fitted with paddle attachment. Beat on medium-high speed until very mixed. Turn the mixer off, then add confectioner’s sugar and vanilla extract. Continue beating until the frosting is smooth and creamy.
When the cake is completely cool, spread the frosting in an even layer on top of the cake. Slice and serve!