Beat the butter on medium speed until smooth.
Reduce the speed to low and slowly add the powdered sugar. Once it's incorporated, gradually add the heavy whipping cream and vanilla extract. Mix on medium for 1 minute or until smooth and creamy.
Divide the buttercream frosting into three separate bowls. Tint one with red food coloring, one with blue, and keep the third bowl without any food coloring.
Put the star tip in the piping bag, but don't cut the bag's tip yet.
Place the bag inside a glass and fold its top over the edge to stabilize it.
Scoop 1/3 of the red frosting into the piping bag off-center. Repeat with the blue and white frosting. Do not overfill and leave some space at the top.
Twist the top of the bag. Set aside.
Take some plain frosting and spread it evenly on top of each cupcake.
Dip the frosted cupcakes into the sprinkles.
Snip off the tip of the piping bag. Pipe a small dollop of red, white, and blue frosting on each cupcake.
Insert a star cupcake topper into the center of the swirl. Repeat with the remaining cupcakes.