Preheat the oven to 350°F (175°C) and generously grease a 13×9-inch baking pan with butter, making sure the corners are well coated so the cake releases easily.
Add the flour, cocoa powder, sugar, baking soda, and kosher salt directly into the pan. Whisk with a fork until fully combined and evenly colored, with no visible cocoa streaks.
Use the fork to make two small wells and one larger well in the dry mixture. This helps the liquids spread more evenly as you mix.
Pour the white vinegar and vanilla extract into the two small wells, then add the vegetable oil into the larger well. It’s fine if the liquids spread slightly.
Slowly pour the water over the mixture. Whisk until the batter is smooth, glossy, and free of lumps, scraping the edges to catch any dry spots.
Place the pan on the center rack of the oven and bake for 30–35 minutes, until a toothpick inserted in the center comes out clean or with a few moist crumbs.
Remove the cake from the oven and let it cool completely in the pan on a cooling rack. Frosting too soon can cause it to melt and slide.
Once cooled, spread chocolate frosting evenly over the top. Finish with rainbow sprinkles if using, slice into squares, and serve.