In your stand-alone mixer with the paddle attachment or using a hand-held mixer, beat the cream cheese, butter, and sugar together at medium speed until light and fluffy (3 - 5 Minutes)
Then add in the eggs one at a time, followed by the vanilla extract and beat until combined.
In a separate bowl, mix the flour, cornstarch, baking soda, baking powder, xanthan gum, and salt.
Slowly add the dry ingredients to the wet ingredients and mix at low speed using the paddle attachment until combined. ( 3 Minutes)
Now add in the chocolate M&M and incoproate it into the cookie dough using a spatula.
Then cover the cookie dough tightly and chill the dough in the fridge for a minimum of 2 hours.
After the cookie dough is chilled, preheat the oven to 180 °C. While the oven is heating, align your cookie tray with baking paper.
Using an ice-cream scooper, scoop the dough and place them on the baking paper at least 5 cm apart.
Place the cookies in the oven and bake for 10 to 11 minutes until the cookie's bottom is slightly golden.
Once the cookies are baked, let them sit at room temperature for 5 minutes before removing them from the baking pan and placing them on a cooling rack.
Turn 12 cookies upside down and add two scoops of vanilla or chocolate ice cream. Then, spread the ice cream to the edges of each cookie using a flat surface such as the back of a measuring cup (see photo above)
Afterward, close each cookie sandwich with the remaining cookies. You should have a total of 12 cookie sandwiches.