Preheat oven to 350°F (175°C) and line a baking sheet with parchment paper.
In a large bowl, beat butter and sugar until light and creamy (about 3–4 minutes).
Add eggs one at a time, mixing well after each addition. Stir in vanilla extract.
In another bowl, whisk together flour, cocoa powder, baking soda, and salt.
Gradually add dry ingredients to the wet mixture and mix until just combined.
Scoop dough into rounded tablespoons and place on prepared baking sheet.
Bake for about 9 minutes until edges are set and tops look slightly soft.
Sprinkle with coarse sugar or salt while warm if desired.
Let cookies cool on the pan for a few minutes, then transfer to a wire rack.
These soft and chewy chocolate cookies will continue to firm up slightly as they cool while staying perfectly soft inside.