Combine sugar and water in a medium saucepan and heat over low heat, stirring until the sugar dissolves.
Increase the heat to medium-high and bring it to a boil.
Place egg yolks in the bowl of a stand mixer fitted with a whisk attachment and beat until thick and foamy.
Cook the sugar and water syrup until it reaches 240°F, then immediately remove from heat.
With the mixer running on low, slowly drizzle the hot syrup into the yolks.
Continue mixing until the bottom of the bowl feels cool and the yolk mixture is at room temperature.
Add the butter one cube at a time, ensuring each piece is fully incorporated before adding the next.
Mix in vanilla and salt, then whip until the buttercream is smooth and creamy, about 5-6 minutes.