Position oven rack in the middle of the oven; preheat oven to 350°; line a standard 12-cup muffin pan with paper or foil liners.
In a bowl, whisk the flour, baking powder, baking soda, salt, and cinnamon together; set aside.
In another bowl, whisk together the grated carrots, sugar, oil, eggs, buttermilk, and vanilla together to combine.
Using a rubber spatula, fold the flour mixture into the carrot mixture until completely combined.
Divide batter evenly among the prepared muffin cups, filling each about 2/3 full.
Bake until golden brown and a pick comes out clean, 20-25 minutes.
Let the cupcakes cool in the pan on a wire rack for 5 minutes.
Transfer cupcakes to a wire rack to cool completely, about 1 hour.
Make frosting--in a bowl, with an electric mixer on med-high speed, beat the cream cheese, butter, and vanilla together until light and fluffy, about 2 minutes.
Gradually beat in the sugar and mix until thoroughly combined; scrape down the sides of the bowl as needed; use right away, or if the consistency is too soft, refrigerate until the frosting is spreadable, about 15 minutes.
Frost cupcakes with the cream cheese frosting (the frosted cupcakes can be refrigerated in an airtight container for up to 5 days; bring to room temperature before serving) and serve.