Preheat the oven to 350 degrees F and line two muffin tins with cupcake liners. Set aside.
In a medium mixing bowl, whisk together flour, baking powder, salt, cinnamon, ginger, and allspice. Set aside.
In the bowl of a stand mixer, beat the butter with the paddle attachment on medium speed until it becomes light and fluffy. (You can also do this in a large mixing bowl with a hand mixer.) Add the sugar and vanilla extract and beat for another 2 minutes. Add the eggs one at a time, mixing after each addition. Then pour in the buttermilk and mix. (The batter will look lumpy, but don't worry.)
Turn off the mixer and add the dry ingredients. Turn the mixer back on at low speed, gradually increasing the speed to medium. Allow it to work until ingredients are just combined
Remove the bowl from the stand mixer and fold in the shredded apple with a rubber spatula. Portion the cupcake batter into the prepared muffin tins, filling each cup 3/4 full.
Bake for 20-25 minutes or until a toothpick inserted in the center comes out clean. Remove from the oven and allow to cool in the pan for a couple of minutes. Then transfer the cupcakes to a wire rack to cool completely, about 1 hour.
Apple Cider Cream Cheese Frosting
Using a stand mixer (or a hand mixer and a large mixing bowl), beat the cream cheese until it's light and fluffy. Add the butter and beat again for 2 minutes until fluffy.
Add the cinnamon, nutmeg, and allspice to the bowl along with 1 cup of powdered sugar. Mix to combine. Add the remaining sugar 1 cup at a time, mixing after each addition. Pour in the apple cider and mix until smooth and combined.
Transfer the frosting to a piping bag fitted with a piping tip. Frost the cooled cupcakes. Garnish with a slice of apple, if desired.
Notes
I used the big holes on my box grater for the apples.