Prep the pan and oven: Heat oven to 350°F (175°C). Grease and line two 8-inch round cake pans with parchment, or one 9×13-inch pan.
Dust lightly with cocoa.
Mix dry ingredients: In a large bowl, whisk flour, cocoa, sugar, baking powder, baking soda, and salt until evenly combined.
Combine wet ingredients (except the hot liquid): In a separate bowl, whisk eggs, buttermilk, oil, and vanilla until smooth.
Bring in the heat: Pour the wet mixture into the dry and whisk until just combined. Slowly stream in the hot coffee (or water), whisking until the batter is smooth and slightly thin. This step helps bloom the cocoa for a richer flavor.
Fill the pans: Divide the batter between prepared pans.
Tap gently to release air bubbles.
Bake: For two 8-inch rounds, bake 28–32 minutes; for a 9×13-inch, bake 32–36 minutes. The cake is done when a toothpick comes out with a few moist crumbs.
Cool completely: Let cakes cool in the pan for 10 minutes, then turn out onto a rack to cool fully. Don’t frost while warm.
Make the frosting: Beat butter until creamy.
Sift in powdered sugar and cocoa. Add vanilla, salt, and half the cream. Beat, adding more cream as needed until smooth, fluffy, and spreadable.
Assemble: For layers, level domes if needed.
Add frosting between layers, then cover the top and sides. For a sheet cake, simply spread frosting over the top.
Set and serve: Let the frosted cake rest 15–20 minutes so the frosting sets slightly. Slice and enjoy.