Preheat the oven to 170C (340F) and line a 9x5-inch (23x13cm) loaf pan with parchment paper.
Into a bowl, sift the flour, cocoa powder, baking powder, and salt. Whisk to combine.
In the bowl of a stand mixer fitted with a paddle attachment (or you can use a bowl and a hand mixer), add the butter, sugar, and vanilla extract. Beat at medium-high speed until the butter is pale and fluffy. Scrape the sides and the bottom of the mixing bowl now and then.
Then, add one egg at a time and beat until fully incorporated. Don’t add the next egg until the previous one is fully combined. Scrape the sides and the bottom of the mixing bowl now and then.
Add the dry ingredients while alternating with the milk and mix on low, starting and ending with the dry ingredients. Should look like this – dry/half of the milk/dry/the rest of the milk/dry. Scrape the sides and the bottom of the mixing bowl now and then.
Pour the batter into the prepared loaf pan and bake on the middle rack for 50-60 minutes, or until a toothpick inserted in the middle comes out dry.
Remove from the oven and let cool down in the loaf pan for 5-10 minutes. Then, transfer the cake onto a cooling rack to cool down completely.