Make the pudding first. In a medium sized sauce pan, whisk together the sugar, cocoa powder, cornstarch and salt, thoroughly, making sure there are no lumps of cornstarch left.
Pour in the non-dairy milk and whisk to fully combine.
Heat the sauce pan on medium high and whisk constantly. Bring to a simmer, reduce heat to medium low. Let simmer, whisking every 10 seconds or so.
Let the pudding simmer until it is nice and thick. About 6 to 8 minutes. Turn off the heat.
Add the vegan butter and vanilla into the sauce pan and then whisk until the butter has melted into the pudding.
Let the pudding cool at room temperature for about 30 minutes, then cover and put in the fridge until it is completely chilled. About 3 to 4 hours or overnight. It will thicken more as it cools.
Once the pudding is cold, make your dirt pudding. Taking 4 small cups, layer 2 to 4 tablespoons of pudding at the bottom of a cup, top with some of the crushed chocolate cookies, another layer of pudding, another layer of cookies and then a few gummy worms. Repeat with the remaining cups.
Serve immediately or let chill until ready to eat! Top with a little vegan whipped topping if desired.