In a medium heatproof bowl, whisk together sugar, cornstarch, cocoa powder, salt, 2/3 cup milk, and egg yolks until smooth. set aside.
1 cup granulated sugar, ⅓ cup cornstarch, 2 tablespoons cocoa powder, ¼ tsp salt, 4 large egg yolks
In a saucepan, heat the rest of the milk over medium heat until it’s just steaming but not boiling.
2 ¾ cups whole milk
Temper the egg mixture: Slowly pour the hot milk into the yolk mixture while whisking constantly to prevent curdling. Start with about ½ cup, then gradually add the rest while whisking.
Return everything to the saucepan and cook over medium heat, whisking constantly, until thick and bubbly. About 2–4 minutes. It should hold a ribbon when the whisk is lifted and leave clear trails.
Remove from heat and immediately whisk in the chopped chocolate, butter, and vanilla until smooth and glossy.
6 oz bittersweet chocolate, 2 tbsp unsalted butter, 1 ½ tsp vanilla extract
For the smoothest texture, pour through a fine mesh sieve into a clean bowl.
Pour into your pre-baked and cooled crust. Press plastic wrap directly on the surface and refrigerate at least 4 hours or overnight.