Prep the pans and oven. Heat the oven to 350°F (175°C). Grease and line two 8-inch round cake pans with parchment.
Lightly flour the sides.
Whisk dry ingredients. In a bowl, whisk flour, baking powder, baking soda, and salt. Set aside.
Cream butter and sugar. In a large bowl, beat butter and sugar on medium-high until pale and fluffy, about 2–3 minutes.
Add eggs and vanilla. Beat in the eggs one at a time, scraping the bowl. Mix in vanilla.
Combine milk and sour cream. Stir them together in a measuring cup until smooth.
Finish the batter. Add the dry ingredients to the butter mixture in three additions, alternating with the milk mixture.
Start and end with dry. Mix on low just until combined. Do not overmix.
Bake. Divide batter evenly between pans.
Smooth the tops and bake 24–28 minutes, or until a toothpick comes out clean and the centers spring back.
Cool completely. Let cakes rest 10 minutes in the pans, then turn out onto a rack, peel parchment, and cool fully.
Make the coffee soak. Stir espresso, liqueur (if using), and sugar (if using) until dissolved. Let it cool to room temperature.
Make the mascarpone cream. In a cold bowl, whisk heavy cream to soft peaks. In a separate bowl, beat mascarpone, powdered sugar, vanilla, and salt on low just to combine.
Gently fold whipped cream into mascarpone in two additions until smooth and spreadable. Do not overmix or it may curdle.
Level and slice (optional). If the cake tops are domed, level them with a serrated knife. For four layers, carefully slice each cake horizontally in half.
Assemble. Place one layer on a serving plate.
Brush generously with coffee soak—don’t drench, but be thorough. Spread a layer of mascarpone cream (about 3/4 cup). Dust lightly with cocoa.
Repeat layers. Add the next cake layer, soak, cream, and cocoa.
Continue until all layers are stacked. Finish the top with a thicker coat of cream and a generous cocoa dusting. Add chocolate shavings if you like.
Chill to set. Refrigerate at least 4 hours, preferably overnight.
This helps the flavors meld and the cake slice cleanly.
Serve. Before slicing, run a hot, dry knife through the cake for neat edges. Keep chilled until serving.