For the cupcakes:
In a stand mixer cream butter and sugar until pale and creamy.
Add eggs 1 at a time and beat for 30 seconds after adding each one and for another minute until well incorporated. Use a spatula to scrape down the sides if necessary.
Add vanilla and mix in.
Mix flour and baking powder together in a separate bowl.
Add half the flour mixture and half the milk to the batter and beat slowly until combined.
Repeat with the remaining flour and milk.
Add vanilla beans if using and mix for 1 minute.
Scoop the batter into lined muffin tins and bake at 180 degrees C for 18-20 minutes until a toothpick inserted comes out clean.
Place cupcakes on a cooling rack and allow to cool completely before frosting.
For the frosting:
Add all ingredients to the bowl of a stand mixer and beat on high speed for 4-5 minutes until frosting is fluffy.
Add colouring if desired and either pipe onto cooled cupcakes or spread using a knife.
Store in an airtight container for 3-4 days.