Preheat your oven to 350 degrees F. This is a crucial step, as having the oven at the correct temperature ensures that your cupcakes bake evenly.
Line a cupcake pan with paper liners. This not only makes for easy removal but also gives a lovely presentation.
In the bowl of an electric mixer fitted with the paddle attachment, beat the unsalted butter and granulated sugar until light and fluffy. This usually takes about 3 to 5 minutes. Make sure to scrape down the sides with a rubber spatula to incorporate everything.
Next, add one egg at a time, beating after each addition until they are thoroughly combined. You should notice the mixture becoming lighter in color and fluffier.
Add the sour cream and ripe bananas. Mix until just combined. The bananas should be broken down but not completely pureed; you want some texture!
In a separate bowl, sift together the all-purpose flour, baking soda, cinnamon, and a pinch of salt. This step helps to evenly distribute the leavening agent and spices.
Gradually add the dry mixture to the wet ingredients, mixing just until smooth, about 1 to 2 minutes. Overmixing may cause the cupcakes to be dense, so stop once combined.
Finally, add the vanilla extract and beat until just incorporated.
Fill each cupcake liner about two-thirds full with batter. This allows enough space for the cupcakes to rise without overflowing.
Bake in the preheated oven for 18 to 20 minutes. They’re done when the tops are golden brown and a cake tester inserted in the middle comes out clean. Rotate the pan halfway through baking to ensure even baking.
Once baked, let the cupcakes cool in the pan for 5 minutes, then transfer them to a wire rack to cool completely before frosting. This cooling step is crucial to avoid melting the frosting.
To prepare the frosting, beat the cream cheese and remaining unsalted butter until smooth. Gradually add the confectioner's sugar and beat until fluffy.
Spoon about 2 tablespoons of frosting onto each cooled cupcake. Using an offset spatula, spread the frosting in swirls, turning the cupcake in your hand for an even coating.
Finally, ring each cupcake with pastel candies or sprinkles if desired. Serve immediately or store in an airtight container in the refrigerator for up to 3 days.