Prep your pan and oven: Heat the oven to 325°F (165°C).
Grease a 9x5-inch loaf pan or a 10-cup bundt pan, then line the bottom with parchment if using a loaf pan. Dust with cocoa powder instead of flour to keep the exterior chocolatey.
Combine dry ingredients: In a bowl, whisk 1 3/4 cups all-purpose flour, 1/2 cup unsweetened cocoa powder, 1 teaspoon baking powder, 1/2 teaspoon baking soda, and 1/2 teaspoon kosher salt. Set aside.
Cream butter and sugar: In a large bowl, beat 1 cup (2 sticks) unsalted butter with 1 1/2 cups granulated sugar on medium speed for 3–4 minutes, until pale and fluffy.
Don’t rush this—proper creaming traps air and keeps the cake light.
Add eggs: Beat in 4 large eggs, one at a time, mixing well after each. Scrape the bowl as needed. Stir in 2 teaspoons vanilla extract.
Mix the wet ingredients: In a small bowl, whisk 1/2 cup sour cream with 1/2 cup whole milk or buttermilk.
If using, add 1/3 cup melted bittersweet chocolate and 2 tablespoons cooled strong coffee. Stir until smooth.
Bring it together: Add the dry ingredients to the butter mixture in three parts, alternating with the sour cream mixture. Start and end with dry ingredients.
Mix on low just until combined. If using, fold in 1–2 tablespoons neutral oil at the end. The batter will be thick and silky.
Fill the pan: Spoon the batter into your prepared pan and smooth the top.
Tap the pan gently on the counter to release air bubbles.
Bake: Bake at 325°F for 60–75 minutes for a loaf pan, or 55–70 minutes for a bundt, until a toothpick inserted into the center comes out with a few moist crumbs but no wet batter. If the top browns too fast, tent loosely with foil for the last 15–20 minutes.
Cool: Let the cake cool in the pan for 15 minutes. Turn out onto a wire rack and cool completely.
This helps the crumb set and keeps the cake moist.
Optional glaze: For a quick chocolate glaze, heat 1/2 cup heavy cream until steaming, pour over 4 ounces chopped chocolate, let sit 2 minutes, then whisk until smooth. Pour over the cooled cake.