Grease and flour two 9-inch round cake pans; set aside.
Whisk flour, baking powder, baking soda, and salt together.
Beat butter and peanut butter until smooth and creamy.
Gradually add sugar, then mix in eggs one at a time.
Stir in vanilla extract.
Alternate adding the dry ingredients and buttermilk, beginning and ending with the dry mix.
Gently fold in the M&M’s.
Divide batter between pans and bake at 350°F for 25–30 minutes.
Cool cakes 10 minutes in pans, then transfer to a rack.
Make frosting by beating butter and peanut butter, then adding powdered sugar, cream, and vanilla.
Assemble the cake and frost the top and sides.
Decorate with extra M&M’s.