Sift and whisk sugar, cocoa powder, cornstarch, and salt together in a saucepan.
Heat saucepan over medium heat. Pour milk in slowly, whisking constantly until incorporated. Cook, stirring often with a metal spoon, until pudding is noticeably thicker and clings to the spoon, about 10 minutes.
Remove from heat; stir in vanilla extract. Divide among 4 small bowls; serve immediately or chill in the refrigerator at least 2 hours.
