Preheat the oven to 350°F (175°C). Grease and line two 9-inch round cake pans with parchment paper.
In a large bowl, whisk together the flour, sugar, cocoa powder, baking soda, baking powder, and salt.
In another bowl, whisk the eggs, oil, buttermilk, sour cream, vanilla, food coloring, and vinegar until smooth.
Gradually add the wet ingredients to the dry ingredients and mix just until combined. Do not overmix.
Divide the batter evenly between the prepared cake pans and smooth the tops.
Bake for 30–35 minutes, or until a toothpick inserted into the center comes out clean or with a few moist crumbs.
Let the cakes cool in the pans for 10 minutes before transferring them to a wire rack to cool completely.
For the frosting, beat the cream cheese and butter until light and fluffy. Gradually add the powdered sugar, then mix in the vanilla and salt until smooth.
Level the cooled cake layers if needed. Spread frosting between the layers, over the top, and around the sides of the cake.
Refrigerate the cake for about 30 minutes before slicing for cleaner cuts.