Place the softened unsalted butter and caramel sauce in the bowl of a stand mixer fitted with the paddle attachment, or use a large mixing bowl and a hand mixer.
Beat on medium speed until the butter and caramel are fully combined and the mixture is smooth and slightly fluffy, about 1–2 minutes.
Add the salt and vanilla extract, then mix briefly to incorporate.
With the mixer on low, gradually add the powdered sugar a cup at a time, mixing until smooth and creamy; scrape the bowl as needed.
If making a salted caramel version, taste the frosting and add up to 1 teaspoon sea salt, mixing until evenly distributed.
Use the frosting immediately to frost cupcakes or a 9-inch layer cake, or store as directed.