Place the butter in the bowl of your stand mixer or a mixing bowl if using a hand mixer.
Cream the butter until it's smooth. Then add in the pumpkin. Mix until well combined.
Add the powdered sugar in ½ cup installments, completely combining before adding the next ½ cup or until the desire consistency you want. Sometimes you may need les, sometimes you may need more.
Add in the spices and salt and vanilla if you are using. Mix to combine.
Make sure whatever you spread the frosting on has cooled
Store leftovers in the fridge, sealed well.
Adding only ½ cup of powdered sugar at a time. Depending on the weather and the moisture content of the pumpkin sometimes you may need more sugar and some times less. So it's best to go slow and see where you are at after every ½ cup.
Once the frosting looks right, don't keep beating it. You don't want to whip too much air into it.
Don't skip adding salt, especially if your pumpkin puree has no salt in it. You only need a little bit.
Always cover leftovers well and place in the fridge. Foods with fat in them tend to pick up funky odors in the fridge.
Make sure your leftover buttercream comes to room temperature before spreading it.