Preheat the oven to 330F (165C) and line two baking sheets with parchment paper.
In a bowl, combine the butter, powdered sugar, and vanilla extract. Using a rubber spatula, mix until the mixture is smooth and paste-like. A hand mixer can also be used to cream everything together.
Add the egg yolk and mix until fully incorporated.
Sift in the flour, cocoa powder, and salt, then mix until a dough forms.
Using a 1 tablespoon cookie scoop, form 20 dough balls, about 15g each. Roll each ball in granulated sugar and place them on the prepared baking sheets.
Gently press each ball to slightly flatten the top. Do not use too much force. Using the back of a ¼ teaspoon measuring spoon or your thumb, make an indentation in the center of each cookie. Be careful not to press too deeply, the cookies should have a thick base.
Bake for about 13 minutes, or until the cookies have spread and puffed up. The indentations will also puff up, so they will need to be pressed again. While the cookies are still hot, gently press the centers once more using a ½ teaspoon measuring spoon to recreate the wells.
Transfer the cookies to a cooling rack and let them cool completely.
Meanwhile, place the chocolate and heavy cream in a heatproof bowl. Microwave until the cream begins to bubble, then whisk until a smooth ganache forms.
Transfer the ganache immediately to a piping bag and fill each cookie while the ganache is still warm. If desired, sprinkle with flaky sea salt, crushed nuts, or freeze-dried raspberries before the ganache sets.
Let the cookies sit at room temperature for about 30 minutes until the filling is set, then serve.