Whisk sugar, cornstarch, and salt in a heavy saucepan before adding liquid. This separates the starch so it is less likely to clump.
Gradually whisk in milk, followed by egg yolks. Continue until the mixture is smooth, checking the corners for dry powder.
Place over medium heat and cook, whisking continuously. Sweep the base and sides rather than stirring only in the middle.
When pudding thickens and begins to bubble gently, continue cooking and whisking for 1 minute. Lower heat if needed to prevent vigorous splattering.
Remove from heat. Stir in butter and vanilla until fully blended; strain through a fine sieve if you notice cooked egg flecks.
Divide between six small bowls. Cover the pudding surface directly with food-safe wrapping if you prefer no skin on top.
Let cool briefly, about 20–30 minutes, then refrigerate at least 2 hours until cold and thick. Keep bowls covered while chilling.
Stir lightly before serving if desired. Add fruit or crumbs at the table rather than mixing wet toppings into pudding intended for later storage.