Preheat the oven to 350 degrees. Prepare two large rimmed baking sheets with parchment paper.
In a medium bowl, whisk together 2 cups of flour, baking powder, and salt.
Beat the butter and the sugar on medium speed, scraping down the sides as needed, beating for 5 to 7 minutes or until fluffy.
Add the egg and vanilla, beating until evenly combined. Add the flour mixture and beat until mixed.
Divide the dough into two equal portions, removing one half from the bowl. Into the half of the dough in the mixing bowl, add the remaining flour, beating until well combined. Remove the dough and set aside.
Place the second half of the dough into the mixing bowl and add the cocoa powder, beating until well combined.
Divide each dough into smaller balls and place alternating the colors in the bowl.
Using a small (1 tablespoon) cookie scoop, portion the cookie dough, scooping from both shades of dough, and shape into balls. Place on the baking sheet about 1 inch apart.
Bake for 8 to 10 minutes or until the cookies are puffed and the edges are set.
Remove the cookie sheets from the oven and immediately press one candy into the center of each cookie.
Transfer to a wire rack and allow the cookies to cool completely. The candies will look like they are melting but do not disturb them and they will resolidify in the correct shape.
Store in an airtight container for up to 1 week or refrigerate for up to 3 weeks. Cooled cookies can also be frozen but sudden temperature changes may cause the candy to “bloom” which is harmless but not pretty.