In medium bowl, whisk together cocoa powder, sugar, flour, baking soda, and salt.
In large bowl, combine the Guinness, melted butter and vanilla. Be sure all ingredients are at room temperature. Add in egg and sour cream. Whisk until combined and smooth.
.Gradually add dry ingredients into the wet mixture. Mix until just combined.
Line 12 muffin cups with paper liners or spray. Fill each about 3/4 full with batter. (I use an ice cream scoop.)
Bake for 20-25 minutes or until toothpick inserted in middle comes out clean. Cool for 2-3 minutes in cupcake tin, and then put them onto cooling rack.
For Buttercream
Whip butter until it is smooth and fluffy, about 3 minutes.
Add powdered sugar gradually, making sure it is completely combined before adding more.
Mix in vanilla extract. Then add in heavy cream one tablespoon at a time, until it reaches your desired consistency.
Pipe or spread onto cupcakes.
For Stout Caramel
Bring stout to boil. Bring down to a simmer until it reduces by half, about 10-15 mins. Watch carefully. Stout will bubble over if you don't keep an eye on it.
Stir in sugar and vanilla. Bring to a boil. Again, watch carefully, sugar bubbles quickly and a lot. Reduce to a simmer, and do not mix caramel for about 10 minutes, until bubbles grow, and mixture thickens to a syrup-y consistence. Mixture is extremely hot!
Remove caramel from the heat and add butter. Allow butter to melt and then slowly pour in heavy cream and salt, stirring constantly until it is fully combined.
Once cooled, transfer to a piping bag to drizzle onto cupcakes. Any leftover caramel can be stored in a resealable glass jar, and refrigerated up to two weeks.