Preheat your oven to 350°F. Line (2) 12-cup muffin pans with cupcake liners.
In a large mixing bowl, add (1) 15.25-ounce box yellow cake mix, ¾ cup whole milk, ½ cup sour cream, ⅓ cup vegetable oil, 3 large eggs, and 1 tablespoon pure vanilla extract. Beat for 2 minutes until smooth.
Divide the batter evenly between 24 liners, filling each just under ⅔ full. A piping bag or large cookie scoop makes this fast and even.
Bake for 15-20 minutes, or until a cake tester or toothpick inserted in the center comes out clean. Do not overbake.
Cool the cupcakes in the pan for 5 minutes, then transfer them to a wire rack and cool completely.
While the cupcakes cool, make the cannoli cream filling. In a mixing bowl, stir together ¾ cup well-drained ricotta, ½ cup mascarpone, ¾ cup powdered sugar, ½ teaspoon pure vanilla extract, and ¼ teaspoon ground cinnamon until smooth. Fold in 2 tablespoons mini chocolate chips. Spoon into a piping bag or a zip-top bag, then refrigerate the cream filling while you prep the cupcakes.
Once the cupcakes are completely cool, use a small knife or a cupcake corer to remove the centers of each cupcake. Aim for a plug that is about ¾ inch wide, and do not cut all the way to the bottom.
Pipe the cannoli filling into each cupcake until the filling sits just at the top of the cutout. You can trim the cupcake plug and place a thin piece back on top if you want a flatter surface for frosting, but it is not required.
Chill the filled cupcakes for 30 minutes. This helps the filling firm up and makes frosting easier.
To make the mascarpone frosting, add (1) 8-ounce tub cold mascarpone, 2 tablespoons cold heavy cream, 1½ teaspoons pure vanilla extract, and a pinch of kosher salt to a large mixing bowl. Mix just until smooth. Do not overbeat.
Gradually add 2 ¼ cups powdered sugar, mixing on low until incorporated. Beat briefly on medium speed until fluffy. If the frosting feels too thick to pipe, add heavy cream 1 tablespoon at a time until smooth and spreadable.
Pipe or spread frosting onto each cupcake. Garnish with ¼ cup of mini chocolate chips and 1-2 tablespoons of chopped pistachios, if you are using.
Serve chilled or let them sit at room temperature for 10-15 minutes before serving for the best texture.