Preheat your oven to 350°F (175°C). Line a cupcake tin with paper liners.
In a medium-sized bowl, whisk together the flour, cocoa powder, sugar, baking powder, baking soda, and salt until well combined.
In another bowl, whisk together the oil or melted butter, eggs, and vanilla extract until well combined. Add the buttermilk and mix until smooth.
Gradually add the wet ingredients to the dry ingredients, stirring until just combined. Be careful not to overmix; a few lumps are okay.
Spoon the batter into the cupcake liners, filling each about 2/3 full.
Bake in the preheated oven for 18-20 minutes or until a toothpick inserted into the center comes out clean. The baking time may vary, so start checking around 15 minutes.
Allow the cupcakes to cool in the tin for a few minutes, then transfer them to a wire rack to cool completely.