Place a fine-mesh strainer over a small bowl. Add the yogurt to the strainer. Place it in the fridge to drain for at least two hours, and preferably overnight. This step is important. Otherwise, the yogurt will be too liquid to make a proper frosting.
Using an electric hand mixer set on medium speed or a hand whisk, beat together the strained yogurt, vanilla, and sweetener (and coconut flour if using) until the frosting thickens, about 2 minutes. Place the frosting in the fridge for 30-60 minutes while you bake and cool your cake or cupcakes.
To frost your cupcakes, wait until they are completely cool. Then, fill a quart-size Ziploc bag with the frosting, snip the corner, and use it to pipe frosting onto the cupcakes. You can also use a spatula or a spoon to spread the frosting on the cupcakes.
Video
Notes
The sugar-free version has 37 calories and 1 gram of carbs per serving (this excludes the carbs found in sugar alcohols such as erythritol).
I don't recommend using a granulated sweetener. This will result in a grainy texture. It's best to use a powdered sweetener. I also don't recommend a liquid sweetener like maple syrup or honey, as those will add too much liquid to the frosting.
This recipe makes enough frosting for 12 cupcakes or a single-layer cake. The nutrition info is for the frosting needed for one cupcake, which is about 2 tablespoons.
I don't recommend storing leftovers of this frosting or making it ahead of time. You should use it right away for cakes or cupcakes that would be enjoyed within an hour or so.