Place your finely chopped chocolate, butter (or coconut oil), and vanilla extract into a heatproof bowl. Set this aside.
In a medium saucepan, gently heat your milk until it just begins to simmer, then remove it from the heat.
In a separate mixing bowl, whisk together the sugar, cocoa powder, cornstarch, and salt until well combined.
In another bowl, lightly beat the egg yolks with an electric mixer on medium speed for about a minute until they're slightly lighter in color.
Lower the mixer speed to low, then gradually add the dry sugar mixture to the beaten egg yolks. Continue beating until combined.
Slowly pour half of the warm milk into the egg yolk mixture, whisking constantly until everything is smoothly combined and tempered.
Pour this tempered cocoa mixture back into the saucepan with the remaining milk.
Cook over medium heat, continuously whisking, for about 8 minutes, or until the pudding thickens beautifully.
Immediately strain the hot pudding mixture into the bowl containing your chocolate, butter, and vanilla. Let it sit undisturbed for 3 minutes to allow the chocolate to melt perfectly.
With a wooden spoon or whisk, stir until the pudding is wonderfully smooth and glossy.
To prevent a skin from forming, press a sheet of plastic wrap directly onto the surface of the pudding.
Chill in the refrigerator for at least 2 hours, or until perfectly set and cold, before serving. Serve chilled, optionally topped with a dollop of light whipped cream and a sprinkle of chocolate shavings!