Place the flour, sugar, cocoa powder, baking soda, and salt in the pan and whisk well to mix, shaking the pan to help it mix evenly.
Make 1 large and 2 small wells in the flour mixture with a spoon or the bottom of a measuring cup.
Pour the oil in the large well and the vinegar and vanilla extract in the small wells.
Pour the water over all of the ingredients and stir just until the batter is evenly combined. Do not overmix.
Bake the cake for 30-35 minutes for an 8x8-inch pan and 25-30 minutes for a 9x9-inch pan until a toothpick inserted in the center of the cake comes out clean.
Let the cake cool completely in the pan before serving.