Preheat the oven to 350°F (175°C) and grease a 24-cup mini muffin tin with nonstick spray.
Fill each mini muffin cup about halfway with the sprinkle chocolate chip cookie dough.
Bake for 12–14 minutes, until the edges are golden brown and centers are still soft.
Let the cookie cups cool in the pan for about 5 minutes, then transfer carefully to a cooling rack to cool completely; the centers will sink slightly, which is normal.
While the cookie cups cool, make the vanilla buttercream: beat 1 cup room-temperature unsalted butter on medium speed until creamy, about 2–3 minutes.
With the mixer on low, add 4 cups confectioners' sugar, 1/4 cup heavy cream, 2 teaspoons vanilla extract, and a pinch of salt; then increase speed to high and beat 2–3 minutes until smooth.
If the frosting is too thin, add an additional 1/2–1 cup confectioners' sugar and beat again; if too thick, thin with extra heavy cream 1 tablespoon at a time.
Pipe or spoon the buttercream into the cooled cookie cups and top with extra rainbow sprinkles, then serve.