Pour milk and vanilla extract into a small saucepan, add half of the granulated sugar, and heat over medium heat.
When small bubbles form around the edges of the milk, turn off the heat (do not let it boil). Remove from heat and set aside.
Add the remaining half of the sugar to the egg yolks and whisk until pale, smooth, and slightly fluffy. Then, mix in all the cornstarch until well combined.
Gradually pour about one-third of the hot milk into the egg yolk mixture, whisking continuously to combine. Then pour the mixture back into the saucepan with the remaining milk and stir well.
Heat over low heat while whisking constantly until the foam subsides and the mixture thickens, becoming glossy and smooth.
Remove from heat and immediately stir in the butter until fully melted and incorporated.
Transfer the custard to a bowl, cover the surface tightly with plastic wrap to prevent a skin from forming, and refrigerate until completely chilled before serving.