**Preheat the oven**
Preheat your oven to 325°F (165°C). Grease and flour a 9x5-inch loaf pan or line it with parchment paper.
**Cream butter and sugar**
In a large bowl, beat the softened butter and sugar on medium speed until light and fluffy, about 2–3 minutes.
**Add eggs and vanilla**
Beat in the eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
**Combine dry ingredients**
In a separate bowl, whisk together the flour, baking powder (if using), and salt.
**Form the batter**
Gradually add the dry mixture to the creamed mixture, mixing on low speed. If using sour cream or yogurt, fold it in after half the flour is incorporated. Mix just until combined; do not overmix.
**Bake**
Pour the batter into the prepared pan, smoothing the top. Bake for 60–70 minutes, or until a toothpick inserted into the center comes out with a few moist crumbs. If the top browns too quickly, loosely cover with foil during the last 10–15 minutes.
**Cool**
Let the cake cool in the pan for 10 minutes, then transfer it to a cooling rack. Slice and serve once fully cooled.