With an electric mixer, beat the butter until creamy, about 2 minutes. Add the confectioners' sugar, cocoa powder, milk or cream, salt, and vanilla. Mix together on low speed. Then increase to high speed and beat for 3 minutes. If frosting is too thin - add up to 1/2 cup more sugar. If too thick - add another tablespoon of cream or milk.
Store in airtight container for up to 1 week in refrigerator or up to 3 months in freezer. After freezing, thaw in refrigerator, then beat the frosting to make it creamy again.