Preheat the oven to 350°F (175°C) and line the muffin pan with paper cupcake liners.
In a medium bowl whisk together flour, baking powder, and salt, then set aside.
In a large bowl beat the softened butter and granulated sugar with an electric mixer until light and fluffy, about 2–3 minutes.
Add the eggs one at a time to the butter mixture, beating well after each addition.
Beat in the lemon zest, lemon juice, and vanilla extract until well combined (the batter may look slightly curdled).
In a small bowl stir together the milk and sour cream until smooth.
Add one-third of the dry ingredients to the wet mixture and mix on low just until combined.
Add half of the milk–sour cream mixture and mix on low until just incorporated.
Repeat with another third of the dry ingredients, the remaining milk mixture, and then the final third of the dry ingredients, mixing gently after each addition until just combined.
Divide the batter evenly among the 12 cupcake liners, filling each about two-thirds full.
Bake the cupcakes for 16–18 minutes, or until the tops spring back lightly and a toothpick inserted in the center comes out clean.
While the cupcakes bake, make the lemon syrup by gently heating the lemon juice and sugar in a small saucepan over low heat, stirring until the sugar dissolves, then set aside to cool slightly.
Remove the cupcakes from the oven and let them cool in the pan for 5 minutes.
While the cupcakes are still warm, poke 4–5 small holes in each with a toothpick and spoon a little lemon syrup over each cupcake, allowing it to soak in.
Transfer the cupcakes to a wire rack and let them cool completely, about 25 minutes.
Meanwhile, prepare the lemon frosting by beating the softened butter in a medium bowl until creamy, about 1 minute.
Gradually add the powdered sugar, mixing on low at first, then increasing to medium until thick and smooth.
Beat in the lemon juice, lemon zest, and salt, then add heavy cream or milk 1 teaspoon at a time until the frosting is fluffy and spreadable.
Once the cupcakes are completely cool, transfer the frosting to a piping bag fitted with your favorite tip or use an offset spatula.
Frost the cupcakes generously, starting from the outside edge and swirling toward the center, then serve or store covered until ready to eat.