In a medium bowl, whisk together the flour, baking powder, baking soda, salt, and cocoa powder and set aside.
In a large mixing bowl, combine the granulated sugar and oil. Add the egg, vanilla extract, and sour cream. Mix until combined.
Use a wooden spoon or spatula to gently stir in half of the flour mixture, followed by the buttermilk. Add in the rest of the flour mixture and mix just until combined.
Preheat the oven to 350°F. Prepare a 24-cup mini cupcake pan with mini cupcake liners. If you prefer not to use liners, lightly grease the pan with cooking spray.
Use a small cookie scoop to fill the cupcake liners ⅔ of the way full. Bake them for 10 minutes or until the center tests done with a toothpick.
Let the cupcakes cool in the pan for about 10 minutes. Then, transfer them to a wire rack to cool completely.
Make The Frosting
In a medium bowl, cream the softened butter with an electric mixer for 1-2 minutes until smooth. Mix in the cocoa powdered and vanilla extract.
Add the powdered sugar one cup at a time, mixing between additions, to keep the frosting smooth.
Mix in 2-3 tablespoons of heavy cream or milk (as needed) until your desired consistency is reached.
Frost + Serve
Once completely cooled, pipe a dollop of chocolate buttercream on top of each cupcake. You could use a frosting knife to spread it on instead.
Add any toppings or decorations if desired. Serve and enjoy!
Spoon and level method for the most accurate flour measurement.
Fill the cupcake liners ⅔ of the way full so they don't overflow.
Check cupcakes with a toothpick before taking them out of the oven to make sure they are finished baking.
For regular-sized cupcakes, bake at 350°F for 18-22 minutes.
Homemade buttermilk: Combine 1 cup of milk (minus 1 tablespoon) with 1 tablespoon of white vinegar or lemon juice. Stir to combine and let it sit for 5 minutes before use.