Preheat the oven to 350°F/180°C and line a muffin pan with 12 cupcake liners. Set aside while you make the batter.
In a large bowl, using an electric hand mixer, cream together the butter and sugar at medium speed until lighter in color and smooth. Then add the eggs, one at a time, mixing after each until it’s well-incorporated. Add the vanilla extract and yogurt, and continue to mix until incorporated. Set the bowl of wet ingredients aside.
In a separate medium bowl, whisk together the flour, baking soda, and salt.
Pour about one-third of the dry ingredients into the wet ingredients and mix until combined using the electric mixer. Then add the rest of the dry ingredients and the sprinkles. Mix just until everything is combined.
Fill the cupcake liners halfway to ⅔ full with batter. Bake in the preheated oven for 20 minutes, or until a cupcake inserted into the center of a cupcake comes out clean. Allow to rest and cool completely before decorating.
Separate the cake batter evenly into three small bowls. Add red food coloring to one, blue food coloring to another, and leave the last bowl white. To each cupcake liner, add a scoop of each color of cake batter, making sure not to fill the cups more than ⅔ full. Use a chopstick or a butter knife to swirl the colors together.
Bake in the preheated oven for 20 minutes, or until a toothpick inserted into the center of a cupcake comes out clean. Allow the cakes to rest and cool completely before decorating.
Make a simple buttercream cupcake frosting by creaming butter in a large bowl. Slowly add the powdered sugar and beat until smooth. Add the salt, vanilla, and heavy cream, and continue blending to get a smooth frosting. Add additional cream if needed to get the right consistency for piping.
Add the frosting to a piping bag fitted with a star tip. Start in the center of the cupcake and pipe a continuous spiral until you’ve covered the whole cupcake.
If desired, top each cupcake with 4th of July sprinkles.