To make the cake, preheat the oven to 350 degrees. In a medium sized bowl, whisk together the flour, sugar, cocoa powder, soda and salt.
Add the water, vanilla, vinegar and oil and whisk until fully incorporated and smooth.
Transfer to a 9-inch pie plate and bake for 25 to 35 minutes, until a toothpick inserted into the center of the cake comes out with a moist crumb or two.
Make the frosting while the cake cools.
To make the frosting, 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.
Whisk the sugar and cocoa powder together in a medium-sized bowl and add a cup at a time to the butter, mixing to combine on low, and alternating with the cream.
Add the salt and vanilla and mix for about 5 minutes on medium until smooth, fluffy and spreadable, adding cream, a tablespoon at a time, if necessary.
Generously frost the cake, decorate with rainbow sprinkles, if using, and serve.