In a medium saucepan, whisk together the cocoa powder, sugar, cornstarch, and salt.
Gradually add the milk to the dry ingredients, whisking continuously until well combined.
Cooking
Place the saucepan over medium heat and stir the mixture continually as it heats.
Once the mixture starts to thicken, usually after about 5-7 minutes, continue stirring for another 2-3 minutes until it reaches your desired thickness.
Remove the saucepan from heat and stir in the vanilla extract and butter until fully melted and incorporated.
Serving
Pour the pudding into serving bowls or cups and let it cool for a bit at room temperature.
Once slightly cooled, you can chill the pudding in the fridge for about 2 hours before serving or serve it warm.
Notes
Store leftovers in an airtight container in the refrigerator for 3-5 days or freeze for 1-2 months. Customize with toppings like whipped cream or fresh berries.