Preheat oven to 350° degrees F. Line 2 muffin tins with 24 paper liners; set aside.
In a large bowl, whisk together the granulated sugar, pumpkin, oil, eggs, and vanilla extract until combined. Add in the baking powder, baking soda, salt, spices, and flour and fold together with a rubber spatula until a soft batter comes together and no lumps remain.
Portion the batter evenly among the muffin cups, filling about 2/3 full. Bake for 15-18 minutes or until a toothpick inserted near the center comes out clean or with moist but not wet crumbs. Cool completely.
For the frosting: In the bowl of a stand mixer, cream together the butter, cream cheese, and vanilla until smooth, about 1 minute. Add in the confectioners' sugar and beat on low speed until fully incorporated and frosting is smooth and fluffy. If frosting is too thick or pasty, add in the heavy cream to thin and smooth it out.
Pipe or spread the frosting onto the cooled cupcakes. Note that if you pipe your frosting super tall like in the photos, you may want to double your frosting recipe. Garnish with a pumpkin candy, if using.