Preheat your oven to 350°F (175°C). Line a baking sheet with parchment paper.
In a large mixing bowl, cream together the softened butter and granulated sugar until light and fluffy, about 3-5 minutes.
Add the egg yolks and vanilla extract to the creamed mixture, and mix until well combined.
In a separate bowl, whisk together the flour, cocoa powder, baking powder, and salt to combine.
Gradually add the dry mixture to the wet ingredients, mixing until just combined. Do not overmix.
Using a tablespoon or cookie scoop, drop rounded balls of dough onto the prepared baking sheet, spacing them about 2 inches apart.
With your thumb or the back of a teaspoon, gently press a well into the center of each cookie dough ball.
Bake for 10-12 minutes, or until the cookies are set around the edges but still soft in the center.
Remove cookies from the oven and let cool on the baking sheet for a few minutes before transferring them to a wire rack.
Once the cookies are completely cooled, fill each thumbprint with chocolate ganache or fruit preserves.