Prep the pan: Heat the oven to 350°F (175°C). Grease an 8-inch square or 9-inch round baking pan and line the bottom with parchment for easy release.
Mix dry ingredients: In a large bowl, whisk flour, sugar, cocoa powder, baking powder, baking soda, and salt until evenly combined and no cocoa lumps remain.
Add wet ingredients (except the hot liquid): Whisk in eggs, oil, buttermilk, and vanilla until smooth.
The batter will be thick.
Bloom with heat: Pour in the hot coffee or hot water and whisk gently until fully incorporated. The batter will look thin—this is right and makes the cake moist.
Fill and smooth: Pour the batter into the prepared pan and tap once on the counter to release air bubbles.
Bake: Bake for 28–34 minutes, or until a toothpick inserted in the center comes out with a few moist crumbs and no wet batter.
Cool: Let the cake cool in the pan for 10 minutes, then turn out onto a rack to cool completely.
Finish and serve: Dust with powdered sugar, or frost once cooled. Slice and enjoy.