Preheat oven to 350 degrees. Butter an 8-inch-round cake pan; line bottom with a round of waxed or parchment paper. Butter paper; dust bottom and sides of pan with cocoa, tapping out excess.
Sift together cocoa, flour, baking powder, and salt. With an electric mixer on medium-high speed, cream butter and 1 cup sugar until light and fluffy. Add eggs one at a time, beating well after each and scraping down sides of bowl as needed. Beat in vanilla. Reduce speed to low. Add flour mixture in two batches, alternating with the sour cream and beginning and ending with the flour.
Spread batter in prepared pan. Tap pan firmly on countertop once to eliminate large air bubbles. Bake until a cake tester inserted into the center comes out clean, 30 to 35 minutes. Cool 10 minutes in pan, then invert onto a wire rack to cool completely (bottom-side up). Set rack with cake over a rimmed baking sheet. Pour glaze over cake, letting it run over sides; spread gently with an offset spatula or table knife to coat. Let set, about 30 minutes.
If desired, whip cream and remaining 2 tablespoons sugar with an electric mixer until soft peaks form. Serve cake with whipped cream and chocolate shavings.
Dusting the pan with cocoa powder (rather than flour) keeps the cake dark on the outside. To make chocolate shavings, scrape along the edge of a bar of chocolate with a vegetable peeler.