Preheat your oven to 350°F. Line two baking sheets with parchment paper or silicone baking mats and set aside.
In a large mixing bowl, use a hand or stand mixer to cream together the softened butter, peanut butter, granulated sugar, and brown sugar until light and fluffy (about 2-3 minutes).
Mix in the egg, egg yolk, and vanilla extract, ensuring the mixture is smooth and well-combined.
In a separate bowl, whisk together the flour, baking soda, baking powder, and salt.
Gradually add the dry ingredients to the wet ingredients, mixing on low speed until just combined. Be careful not to overmix.
Gently fold in the M&Ms and chocolate chips (if using).
Scoop about 1.5 tablespoons of dough (a medium cookie scoop works perfectly) and roll into balls and press down slightly. Place them onto the prepared baking sheets, leaving about 2 inches between each cookie. For a bakery-style look, press a few extra M&Ms on top of each ball of dough.
Bake for 9-11 minutes, or until the edges are set but the centers still look slightly soft. Do not overbake – they will continue to firm up as they cool.