Gather either 4 single pudding dishes or a serving bowl to pour pudding into.
Mix sugar, cocoa powder, cornstarch, and salt together in a saucepan.
Whisk in ¼ cup coconut milk until mixture is foamy and smooth.
Continue adding and whisking coconut milk, in small increments, into chocolate mixture until smooth.
Place saucepan over medium-high heat and cook, stirring constantly, until mixture comes to a simmer and starts to thicken (about 6-9 minutes).
Remove saucepan from heat and add vanilla extract; still well.
Immediately pour pudding into 4 pudding dishes or a serving bowl
Refrigerate until chilled (1-2 hours)