Preheat Oven: Preheat the oven to 350°F (175°C).
Prepare Cupcake Pan: Add a layer of rice to the bottom of half the cupcake liners.
Mix Dry Ingredients: In a bowl, combine flour, sugar, baking powder, and salt.
Cream Butter and Sugar: In another bowl, cream the softened butter and sugar until light and fluffy.
Add Eggs and Vanilla: Add eggs one at a time, mixing well after each addition, then stir in vanilla.
Combine Mixtures: Gradually add the dry ingredients to the wet mixture, alternating with milk until well combined.
Fill Cupcake Liners: Spoon the batter into the cupcake liners, filling them about 2/3 full.
Bake: Bake in the preheated oven for 18-20 minutes or until a toothpick comes out clean.
Cool and Decorate: Let the cupcakes cool before topping with sprinkles.