Preheat the oven to 350°F (175°C) and line a baking sheet with parchment paper.
In a mixing bowl, cream the softened butter and granulated sugar together until light and fluffy.
Add in the vanilla extract and mix until combined.
In another bowl, whisk together the flour, cocoa powder, and salt. Gradually mix this dry mixture into the wet mixture until well blended.
Stir in the chopped nuts if using, ensuring they are evenly distributed throughout the dough.
Scoop out tablespoon-sized portions of the dough and roll them into balls. Place them on the prepared baking sheet about 2 inches apart.
Bake in the preheated oven for 10-12 minutes, until the edges are set but the centers are still soft.
Allow the cookies to cool on the baking sheet for about 5 minutes, then transfer them to a cooling rack.
Once cooled, roll the cookies in powdered sugar to coat them generously.