Cream the butter first for a few minutes with a paddle attachment on medium speed. Turn off mixer. Then sift together the powdered sugar and cocoa powder into the bowl. Turn the mixer into the lowest speed (very important unless you want to inhale the sugar and cocoa powder) and mix until the sugar and cocoa powder are absorbed by the butter. Then increase the mixer speed to medium, add vanilla extract, salt and milk/cream and beat for 3 minutes.
Notes
If your frosting is more stiff than you like then add more milk, 1 tablespoon at a time. If it is too thin, then add a little bit of powdered sugar at a time until desired consistency is reached.
Recipe by sprinkles and sauce at https://sprinklesandsauce.com/chocolate-buttercream-frosting/