Line a baking sheet with parchment paper and set it aside. In a large bowl, use an electric mixer to cream together the softened butter, brown sugar, and granulated sugar until light and fluffy. Add the egg yolk and mix until fully incorporated.
Add the flour, cocoa powder, salt, and baking powder to the bowl. Mix until a thick dough forms. If the dough seems crumbly, gently knead it with your hands just until it comes together.
Scoop tablespoon-sized portions of dough and roll them into smooth 1-inch balls. Place them about 1 inch apart on the prepared baking sheet. Using a ½ teaspoon measuring spoon, gently press into the center of each ball to create a small cavity.
Transfer the baking sheet to the refrigerator and chill the shaped cookies for 30 minutes. While the dough chills, preheat your oven to 350°F.
Bake the chilled cookies for 9 to 11 minutes. As soon as they come out of the oven, gently press the centers again with the ½ teaspoon to redefine the thumbprint shape. Allow the cookies to cool completely on the baking sheet.
To make the raspberry cream filling, mash the raspberries in a small bowl using a fork or mortar and pestle. In a small saucepan over medium heat, melt the butter, then stir in the crushed raspberries until combined. Remove the saucepan from the heat and add the powdered sugar, stirring until smooth. Add the milk and mix until the filling becomes creamy and smooth.
Let the raspberry filling cool slightly until thickened, then spoon it into the center of each cooled cookie. Top with a fresh raspberry if desired.