1️⃣ Preheat oven to 350°F (175°C). Line a muffin tin with black or silver cupcake liners.
2️⃣ In a medium bowl, whisk together flour, cocoa powder, baking powder, baking soda, and salt.
3️⃣ In a large bowl, whisk oil and sugar until combined. Add eggs, one at a time, then mix in buttermilk and vanilla.
4️⃣ Add dry ingredients to wet and mix just until combined. Pour in hot coffee and stir — batter will be thin.
5️⃣ Divide batter into liners and bake 18–20 minutes, until a toothpick comes out clean. Cool completely before frosting.
6️⃣ For frosting, beat butter until creamy. Gradually add powdered sugar, heavy cream, and vanilla until fluffy.
7️⃣ Divide frosting into 3–4 bowls and tint each with navy, purple, teal, and a touch of black. Spoon dollops of each color randomly into a piping bag fitted with a star tip, then pipe onto cupcakes to create a galaxy swirl.
8️⃣ Sprinkle with edible silver glitter or star sprinkles.