
In the bowl of a stand mixer fitted with a paddle attachment, (or a large bowl with a handheld mixer), beat together the cream cheese and butter on medium speed until creamy, about 3 minutes.
Add the vanilla extract and salt, if using, and sift in half of the powdered sugar. Beat on low speed for 30 seconds, just until combined.
Sift in the remaining powdered sugar and cocoa powder. Beat on low speed for 30 seconds just until combined. Increase the speed to medium and beat for 2 minutes until light and fluffy. If the frosting is too thick or dry, add the milk 1 teaspoon at a time and beat until combined. Use immediately by spreading on cake or piping onto cupcakes.