You can! If you want to prep the frosting in advance, just keep it stored in the fridge in an airtight container. Then, when you're ready to use it, set it out of the fridge to come to room temperature before adding it to the top of the cooled cupcakes.