In a 3 to 4-quart heavy-bottom saucepan, combine the granulated sugar, cornstarch, and milk. Set over medium heat and whisk continually until the mixture starts to bubble and thickens, about 6 to 8 minutes.
Remove the saucepan from the heat and slowly whisk 1 cup of the hot mixture into the egg yolks. This will gently raise the temperature of the yolks without cooking them.
Whisk the egg yolk mixture back into the custard, and return the saucepan to the heat. Continue whisking for another 2 to 3 minutes until it thickens further.
Remove from heat and blend in the butter and vanilla. Strain the custard through a fine-mesh sieve to remove any lumps.
Pour the custard into a heat-safe medium bowl or individual serving bowls. Cover with plastic wrap to prevent a skin from forming and refrigerate for 2 hours before serving.
Notes
Tips include whisking constantly while heating to prevent lumps, using room-temperature egg yolks for smoother integration, and experimenting with flavor variations.