Start by lining your muffin tins with paper liners.
Add the softened butter and granulated sugar to the bowl of a stand mixer fitted with the paddle attachment.
Cream the butter and sugar together on medium speed until light and fluffy-- about two minutes. Next, add the eggs and vanilla and mix to combine.
In a small bowl, whisk together the flour and baking powder.
With the mixer on low speed, add the flour and milk alternating. Begin by adding ⅓ of the flour, followed by ½ of the milk, another ⅓ of the flour, the remaining ½ of milk, and finally the rest of the flour.
Mix just until no large lumps remain. You don’t want to overmix! The batter will be thick, but that’s okay.
Divide the batter between the muffin tins, filling each one about ¾ of the way full. Set the pan into the air fryer for 10-12 minutes, at 320 degrees F, air fryer setting, or until a toothpick inserted into the center comes out clean.
Transfer the cupcakes to a wire rack to cool before icing.
Add the butter and vanilla to the bowl of a stand mixer fitted with the paddle attachment. Beat on medium speed until it is smooth and creamy.
With the mixer on low, slowly add the powdered sugar a little at a time. Once all of the powdered sugar has been added, add the melted chocolate.
Turn the mixer to high speed and beat the icing until it is light and fluffy-- about 2 minutes.
Transfer to a piping bag fitted with your choice of tip. Frost the cupcakes and sprinkle with sea salt.