Prep your pans. Grease your pans and line the bottoms with parchment.
Grease again and lightly dust with cocoa powder. Preheat the oven to 350°F (175°C).
Mix dry ingredients. In a large bowl, whisk flour, sugar, cocoa powder, baking powder, baking soda, and salt until no streaks remain.
Add wet ingredients (except hot liquid). Add eggs, buttermilk, oil, and vanilla. Whisk until smooth.
It will be thick—this is good.
Bloom with heat. Pour in the hot coffee (or hot water) slowly while whisking. The batter will loosen and become glossy and pourable.
Fill and bake. Divide batter evenly between pans (or pour into the 9x13). Bake 28–32 minutes for 8-inch pans or 30–35 minutes for a 9x13, until 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.
Peel off parchment and cool fully to prevent frosting meltdown.
Make the frosting. Beat butter until creamy. Add powdered sugar, cocoa, vanilla, salt, and half the cream. Beat, adding more cream as needed until smooth and spreadable.
Frost and finish. For layers, place the first cake on a plate, spread frosting, top with the second layer, and coat the top and sides.
For a 9x13, frost the top generously. Add sprinkles or shaved chocolate if you like.