Preheat the Oven: Preheat the oven to 350ºF (180ºC). Line a 9-inch square baking pan with parchment paper, leaving an overhang on the sides to easily lift the cookie bars out after baking. Set aside.
Melt the Butter: Melt the butter in a small saucepan over low heat, stirring occasionally. Alternatively, melt in the microwave in 30-second intervals.
Cool the Butter: Pour the melted butter into a large mixing bowl and allow it to cool for 10 minutes until it is only slightly warm. Ensure it does not firm back up.
Combine Dry Ingredients: In a medium mixing bowl, whisk together the flour, cornstarch, baking soda, and salt until evenly combined. Set aside.
Mix Sugars: Add both sugars to the slightly warm melted butter and whisk for 20 seconds until well combined.
Add Egg and Vanilla: Add the egg and vanilla extract and whisk until smooth and fully incorporated, about 15 seconds.
Add Dry Ingredients: Add the flour mixture and use a rubber spatula or wooden spoon to fold and mix until a thick cookie dough forms.
Add M&Ms and Chocolate Chips: Add the M&Ms and chocolate chips and mix until evenly distributed throughout the cookie dough.
Transfer to Pan: Transfer the dough into the prepared baking pan and press it into an even layer using a spatula. The dough will be thick.
Bake: Bake for 21-23 minutes or until the edges are lightly golden and a toothpick inserted into the centre comes out with a few moist crumbs attached. Do not overbake, as the cookie bars will become dry. Slightly underbaking helps create a soft and chewy texture.
Cool: Remove from the oven and allow the cookie bars to cool in the pan for 30 minutes. If desired, gently press extra M&Ms and chocolate chips into the top while they are still warm. Carefully lift the bars out using the parchment paper overhang and transfer to a wire rack to cool completely before slicing.