In a medium saucepan, over medium heat, heat the heavy cream until simmering, stirring occasionally.
Meanwhile, in a medium bowl, whisk together the egg yolks, sugar and salt.
Add the cornstarch and whisk until the mixture is pale yellow and thick, about 15 seconds.
When the cream reaches a full simmer, slowly whisk it into the yolk mixture.
Return the mixture to the saucepan and cook over medium heat, whisking constantly, until it’s a thick pudding consistency, 1 to 2 minutes.
Remove the pan from the heat and whisk in the butter and vanilla extract until the butter is completely melted.
Transfer the pastry cream to a small bowl and press plastic wrap directly on the surface.
Refrigerate until set, at least 2 hours or up to 2 days.