Prep the pan: Heat oven to 350°F (175°C). Grease your pan and line the bottom with parchment for easy release. For ramekins or cupcakes, grease or line as needed.
Combine dry ingredients: In a medium bowl, whisk flour, sugar, cocoa, baking soda, baking powder, and salt until no streaks remain.
Mix wet ingredients: In a separate bowl, whisk melted butter, oil, egg, buttermilk, and vanilla until smooth.
Bring in the heat: Stir in the hot coffee or hot water.
The batter will be thin—this is good. Hot liquid helps bloom the cocoa for deeper flavor.
Bring it together: Pour wet ingredients into dry. Whisk gently until just combined. Do not overmix—a few small lumps are fine.
Fill and bake: Pour batter into the prepared pan.
Bake until the center springs back and a toothpick comes out with a few moist crumbs: 6-inch round: 22–26 minutes
Ramekins: 16–20 minutes
8x4-inch loaf: 20–24 minutes
Cupcakes: 15–18 minutes
Cool: Let the cake cool in the pan for 10 minutes, then turn out onto a rack to cool completely before frosting.
Make the frosting: Beat butter until fluffy. Sift in powdered sugar and cocoa. Add salt, vanilla, and just enough milk to reach a smooth, spreadable consistency.
Beat 1–2 minutes until light and creamy.
Frost and finish: Spread frosting over the cooled cake. Add sprinkles, shaved chocolate, or a pinch of flaky salt if you like.