In a large bowl, beat the softened butter and granulated sugar together with a handheld or stand mixer until light, fluffy, and creamy.
Add the egg, vanilla extract, and the coffee extract if using, and mix until smooth and fully combined.
In a separate bowl, sift together the flour, cocoa powder, and salt.
Gradually fold the dry ingredients into the butter mixture until a soft, evenly mixed chocolate cookie dough forms.
Line one large or two small baking sheets with parchment paper.
Scoop the dough into about 30 equal portions, then roll each one between your palms into a smooth ball. Arrange the dough balls on the prepared baking sheets, spacing them about 1½ inches apart.
Press your thumb or the back of a measuring teaspoon into the center of each dough ball to create a small well for the ganache.
Transfer the baking sheet(s) to the refrigerator and chill the cookies for 30–40 minutes.
While the cookies chill, preheat the oven to 350°F (180°C), or 330°F (165°C) if using convection.
Bake the chilled cookies on the middle rack for about 10 minutes, rotating the baking sheet halfway through for even baking.
If the indentations have puffed up during baking, gently re-press the centers with the back of a teaspoon while the cookies are still warm.
Let the cookies cool on the baking sheet for about 10 minutes, then transfer them to a wire rack to cool completely.
To make the ganache, place the chopped chocolate in a medium heatproof bowl. Heat the cream in a small saucepan over medium heat until it just begins to simmer around the edges.
Immediately pour the hot cream over the chocolate, let it sit for a minute, then stir until smooth and glossy.
Once the cookies are completely cool, spoon or pipe the ganache into the center of each one.
Decorate with Christmas sprinkles while the ganache is still soft, then let everything set before serving.