Start by adding flour, baking powder, and salt to a large bowl and stir until well combined.
In the bowl of a stand mixer, combine room temperature unsalted butter and sugar. Blend with the paddle attachment on a medium speed until the mixture is light and fluffy, about 3-4 minutes.
Scrape down the sides of the bowl and add the sourdough discard. Mix until just incorporated, then add the eggs one at a time, ensuring each egg is fully mixed in before adding the next.
In a separate bowl, mix together the sourdough starter discard, melted coconut oil, milk, and vanilla.
Gradually add the dry ingredients to the wet ingredients, mixing on low speed until just combined. Avoid overmixing.
Divide the batter evenly among 12 cupcake liners in your cupcake tin, filling each liner about 2/3 full.
Bake cupcakes in a preheated oven at 350°F for about 15-18 minutes, or until the tops of the cupcakes spring back when lightly pressed and are golden brown.
Remove the tin from the oven and place it on a wire rack to cool. While the cupcakes are cooling, prepare your frosting.