Preheat your oven to 350°F (175°C). Grease and flour a 9x13-inch baking dish.
In a mixing bowl, prepare the chocolate cake mix by combining the cake mix, water, vegetable oil, and eggs. Beat until smooth, about 2 minutes.
Pour the cake batter into the prepared baking dish and bake for 25 minutes or until a toothpick inserted in the center comes out clean. Let it cool completely.
While the cake is cooling, whisk together the chocolate pudding mix and milk in a large bowl until thickened, about 2 minutes. Set aside.
In another bowl, whip the heavy cream, powdered sugar, and vanilla extract until stiff peaks form.
Once the cake is cool, cut it into small squares or crumbles.
In your trifle dish or serving glasses, layer the dessert by starting with a layer of chocolate cake, followed by a layer of chocolate pudding, then a layer of whipped cream. Repeat the layers until you reach the top of the dish.
Finish with a layer of whipped cream and top with chocolate shavings or chocolate chips. Optionally, garnish with fresh berries.
Refrigerate the trifle for at least 1 hour before serving to allow the flavors to meld.