Whisk together all-purpose flour, granulated sugar, and milk in a saucepan until smooth. Place on the stovetop over medium-low heat.
Cook the milk mixture over medium-low heat whisking constantly. The mixture will slowly thicken as it heats. This will take about 10 minutes.
Once the mixture has thickened, remove from the heat, pour into a heat-proof bowl, and cover with plastic wrap placed directly on top of the custard. Cool to room temperature and then chill in the refrigerator for about 1 hour.
Using a stand mixer fitted with a whisk attachment or an electric hand mixer, whip the room temperature unsalted butter for about 5 minutes until light, pale, and fluffy.
Add cooled milk mixture to the butter, one spoon at a time, while the mixer is on medium speed.
Add vanilla extract or vanilla bean paste and a pinch of salt. Be sure to scrape the sides and bottom of the bowl to ensure everything is well mixed.
Whip the buttercream for up to 15 minutes until light and fluffy. The time it takes depends on your butter temperature and temperature of the milk mixture. You will know when it is ready when the buttercream is perfectly smooth!
Switch to a paddle attachment and mix on low speed for about 5-10 minutes to make the buttercream silky smooth.