Preheat your oven to 350°F (175°C) and line a muffin tin with cupcake liners.
In a large mixing bowl, combine the flour, sugar, cocoa powder, baking soda, baking powder, and salt. Whisk until well blended.
Add the egg, milk, vegetable oil, and vanilla extract to the dry ingredients. Mix until combined.
Carefully stir in the boiling water until the batter is smooth.
Divide the batter evenly among the cupcake liners, filling each about two-thirds full.
Bake for 18-20 minutes or until a toothpick inserted into the center comes out clean. Allow the cupcakes to cool in the pan for 5 minutes before transferring them to a wire rack to cool completely.
While the cupcakes cool, prepare the buttercream frosting. In a large bowl, beat the softened butter until creamy. Gradually add the powdered sugar, mixing well.
Add the vanilla extract and 2 tablespoons of heavy cream. Beat until fluffy. If the frosting is too thick, add more heavy cream, one tablespoon at a time, until desired consistency is reached.
Divide the frosting into three bowls. Color one bowl blue, one purple, and one pink using food coloring.
Using a piping bag or a spatula, frost the cooled cupcakes with the different colored frostings to create a galaxy effect. Swirl the colors together for a beautiful finish.
Serve immediately or store in an airtight container at room temperature for up to 3 days.