Prep your ingredients: Chop the chocolate into small pieces so it melts quickly.
Measure out everything else. Have a medium saucepan and a whisk ready.
Mix dry ingredients: In the saucepan (off heat), whisk together the sugar, cocoa powder, cornstarch, and a pinch of salt until there are no lumps. This keeps the mixture smooth later.
Add the dairy: Slowly whisk in the milk, a little at a time, to create a lump-free mixture.
Add the heavy cream and whisk again until fully combined.
Cook over medium heat: Place the pan over medium heat and whisk continuously. As it warms, the mixture will start to thicken. Don’t rush it.
Keep whisking to prevent sticking and clumps.
Simmer briefly: When it begins to bubble and thickly coat the back of a spoon, reduce the heat to low and cook for 1 to 2 minutes more, whisking the whole time. It should be silky and pudding-like.
Stir in chocolate and butter: Remove from heat. Add the chopped chocolate and butter.
Let it sit for 30 seconds, then whisk until completely melted and smooth.
Add vanilla: Stir in the vanilla extract. Taste and adjust sweetness if needed, adding a little more sugar while the mixture is still warm and whisking until dissolved.
Strain for extra smoothness (optional): For a flawless texture, pour the mixture through a fine-mesh sieve into a bowl or pitcher.
Portion and chill: Divide into small ramekins, glasses, or a shallow dish. Press plastic wrap directly onto the surface to prevent a skin from forming.
Chill for at least 2 hours, or until set.
Serve and garnish: Remove the plastic wrap. Top with whipped cream, berries, shaved chocolate, or a pinch of flaky salt. Serve cold.