In a medium saucepan, heat the milk over medium heat.
In a bowl, whisk the egg yolks and granulated sugar until light and fluffy.
Add the cornstarch to the bowl and whisk vigorously until no lumps remain.
Whisk in 1/4 cup of the hot milk mixture from the saucepan into the bowl until incorporated.
Whisk in the remaining hot milk mixture into the bowl.
Using a strainer, pour the mixture from the bowl into the saucepan. Cook over medium-high heat, whisking constantly, until thickened and slowly boiling.
Remove from the heat and stir in the butter and vanilla. Let cool slightly.
Cover with plastic wrap, lightly pressing the plastic against the surface to prevent a skin from forming.
Chill at least 2 hours or until ready to serve. (The custard can be made up to 24 hours in advance. Refrigerate until 1 hour before using.)