Preheat your oven to 350°F (175°C) and grease all cake pans thoroughly.
Line the bottoms with parchment paper to prevent sticking and ensure easy removal.
In a medium bowl, whisk together flour, baking powder, baking soda, and salt until well combined.
In a large mixing bowl, beat butter and sugar together on medium-high speed for 3–5 minutes until pale, fluffy, and airy. This step is crucial for creating a light cake texture.
Slowly pour in the vegetable oil while mixing, allowing it to fully incorporate into the butter mixture.
Add eggs one at a time, mixing well after each addition to maintain a smooth batter.
Stir in vanilla extract and mix until evenly combined.
Add sour cream and mix until smooth and creamy.
Gradually add half of the dry ingredients into the wet mixture and mix gently.
Pour in the buttermilk and mix until just combined.
Add the remaining dry ingredients and fold gently using a spatula to avoid overmixing.
Fold in the rainbow sprinkles carefully, ensuring they are evenly distributed without bleeding color.
Divide the batter evenly between the prepared cake pans, filling each about halfway.
Tap the pans lightly on the counter to release any trapped air bubbles.
Bake for 25–30 minutes or until a toothpick inserted into the center comes out clean.
Remove cakes from the oven and let them cool in the pans for 10–15 minutes.
Transfer to a cooling rack and allow to cool completely before frosting.
For the frosting, beat butter until smooth and creamy.
Gradually add powdered sugar while mixing on low speed.
Add vanilla extract and milk, then beat on medium-high speed until light, fluffy, and spreadable.
Level the cake layers if needed using a serrated knife.
Place the first cake layer on a stand and spread an even layer of frosting.
Add the second layer and repeat the frosting process.
Place the final layer on top and frost the entire cake smoothly.
Decorate with sprinkles on top and sides while the frosting is still fresh so they stick easily.
Chill the cake for 20–30 minutes for cleaner slices.
Slice and serve at room temperature for the best flavor and texture.