Add the milk, heavy cream, egg yolks, sugar, cocoa powder, and cornstarch to a large saucepan set over medium heat. Cook, stirring occasionally, until the mixture has thickened enough to coat the back of a spoon, about 7-8 minutes. Remove the pan from the heat. Add the vanilla extract and stir to combine.
1 cup milk, 1 cup heavy cream, 2 large egg yolks, ¼ cup granulated sugar, ½ cup unsweetened cocoa powder, 1 tablespoon cornstarch, 1 teaspoon pure vanilla extract