Whisk egg yolks, sugar, and cornstarch until pale and smooth, then heat milk with a pinch of salt until steaming.
Temper the yolk mixture with half the hot milk, return to the saucepan, and cook over medium heat while whisking until thick and bubbling, 2–3 minutes.
Remove from heat and whisk in butter and vanilla until glossy, then spread in a shallow dish, press plastic wrap onto the surface, and chill until cold.
For a lighter filling, whip cold heavy cream to soft peaks and fold into the chilled pastry cream just before filling.
Warm milk to 105–110°F, stir in yeast and a teaspoon of sugar, and let it foam for 5–10 minutes.
Combine flour, remaining sugar, and salt in a mixer bowl, add the foamy yeast mixture and eggs, and mix until a shaggy dough forms.
Knead on medium, add softened butter in pieces, and continue kneading until the dough is smooth, elastic, and slightly tacky with a windowpane.
Place the dough in a greased bowl, cover, and let rise in a warm spot until doubled, about 1 to 1.5 hours.
Turn the dough onto a lightly floured surface, pat into a rectangle, cover, and chill 20–30 minutes to firm up for shaping.
Roll to about 1/2 inch thick, cut 3-inch rounds, re-roll scraps once, and place on parchment-lined sheets with space between.
Cover and let rise until puffy and lighter, 45–75 minutes, until a gentle tap springs back slowly and leaves a slight indentation.
Heat 2–3 inches of oil to 350–355°F and fry 2–3 doughnuts at a time for 1–2 minutes per side until deep golden with a pale band.
Drain on a wire rack and roll warm doughnuts in sugar, or let cool completely if glazing.
Whisk the chilled pastry cream until smooth, optionally fold in whipped cream, then load into a piping bag fitted with a Bismarck or small round tip.
Poke a hole in the side of each cooled doughnut and pipe cream until it feels slightly heavier and just begins to swell without leaking.
Serve soon after filling, or refrigerate filled doughnuts in an airtight container for up to 2 days.