In a medium saucepan, whisk together the sugar, cocoa powder, cornstarch, and salt until well combined.
Gradually add the whole milk to the dry ingredients, whisking continuously to ensure there are no lumps.
Place the saucepan over medium heat and cook the mixture, stirring constantly, until it begins to thicken and bubble. This should take about 5-7 minutes.
Once the pudding has thickened, remove it from the heat and stir in the butter and vanilla extract until fully melted and combined.
Pour the pudding into individual serving dishes or a large bowl. Cover with plastic wrap, pressing it directly onto the surface of the pudding to prevent a skin from forming.
Refrigerate for at least 2 hours or until chilled and set.
When you’re ready to serve, you can top the pudding with whipped cream, chocolate shavings, or fresh berries for an extra treat.