Preheat your oven to 375 degrees F (190 degrees C). This ensures the oven is hot enough to bake the cake evenly once we pour in the batter.
Prepare your baking pan by greasing a 9x13-inch baking pan with non-stick cooking spray. This will help your cake come out smoothly without sticking.
In a medium saucepan, stir together the granulated sugar, unsweetened chocolate, unsalted butter, and water. Place over medium heat and stir occasionally until all the ingredients are completely melted together. Once melted, remove from heat and let cool slightly for about 10 minutes. This step is crucial to avoid cooking the eggs when combined.
Next, whisk in the buttermilk and eggs into the cooled mixture. It’s important to ensure the mixture isn’t too hot before adding the eggs, or they might scramble.
In another bowl, sift together the all-purpose flour, baking soda, baking powder, and salt in three additions, gently whisking to combine after each addition. This helps to aerate the flour and make the cake lighter.
Now, add the vanilla extract to the batter and whisk briefly to blend everything together. The batter should be smooth and glossy at this stage.
Pour the batter into the prepared pan, spreading it into an even layer with a spatula. This will help the cake bake evenly.
Bake in the preheated oven for about 30 to 40 minutes, or until a skewer inserted in the center comes out clean. This is the moment we’ve been waiting for!
Once baked, allow the cake to cool completely in the pan before frosting. This will ensure the frosting doesn’t melt when applied.
For the frosting, using an electric mixer, beat together the cream cheese and unsalted butter on medium-high speed until creamy, about 3 minutes. Scrape down the bowl as needed.
Sift in the powdered sugar and unsweetened cocoa powder, then add the salt. Mix on low speed until well combined, then scrape down the bowl. Increase to medium-high speed and beat until smooth and whipped, about 1 minute.
Add the vanilla extract and beat on medium-high for an additional minute until fluffy.
Spread the frosting evenly over the top of the cooled cake using a spatula. This cake can be stored, covered, at room temperature or in the refrigerator for up to 4 days, but it’s best enjoyed fresh!