Step 1: Prepare the Cupcakes: Preheat oven to 350°F (175°C). Line a 12-cup muffin pan with cupcake liners. In a large bowl, whisk together flour, sugar, cocoa powder, baking soda, baking powder, and salt. In another bowl, mix egg, buttermilk, oil, and vanilla extract. Gradually add wet ingredients to dry ingredients, mixing until just combined. Stir in hot water or coffee until smooth.
Step 2: Bake the Cupcakes: Divide batter evenly among the 12 cupcake liners. Bake for 18–20 minutes, or until a toothpick inserted in the center comes out clean. Allow cupcakes to cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
Step 3: Make the Peppermint Frosting: In a large bowl, beat softened butter until creamy. Gradually add powdered sugar, 1 cup at a time, mixing well. Add heavy cream and peppermint extract, and beat until smooth and fluffy. Optional: Divide frosting in half, add red food coloring to one half, and lightly swirl for a festive effect.
Step 4: Frost the Cupcakes: Transfer frosting to a piping bag with a star tip (or spread with a spatula). Pipe or spread frosting onto cooled cupcakes. Sprinkle crushed candy canes or peppermint candies on top.