In a medium-sized bowl, whisk together the flour, sugar, cocoa powder, baking soda, and salt.
Add the water, oil, vinegar, and vanilla, and whisk until fully incorporated and smooth.
Transfer to a 9-inch (23-cm) pie plate and bake until a toothpick inserted into the center of the cake comes out with a moist crumb or two, 25 to 35 minutes.
Let the cake cool completely before frosting.
Make the chocolate frosting
While the cake is cooling, place the butter in the bowl of a stand mixer fitted with the paddle attachment, and beat the butter on medium speed until soft and smooth, 2 to 3 minutes.
Whisk the sugar and cocoa powder together in a medium-sized bowl. With the mixer on low speed, slowly add the sugar mixture and 1/2 cup of cream to the butter in batches, beginning and ending with the sugar mixture.
Add the vanilla and salt and mix on medium until smooth, fluffy and spreadable, about 5 minutes, adding remaining cream, a tablespoon at a time, if necessary.
Generously frost the cake, decorate with rainbow sprinkles, if desired, and serve.