Here’s the truth: If your buttercream is made with real butter and powdered sugar (a classic American buttercream), it is actually quite stable at room temperature. You don’t have to refrigerate it—for a day or two.
The main concern isn’t the frosting going bad; it’s the filling or the cake itself. A plain vanilla cake with buttercream? Totally fine on the counter for 24-48 hours.
But if your cake has custard, fresh fruit, cream cheese, or any dairy-heavy filling? That’s a whole different ballgame. Then, yes, refrigerate that thing immediately unless you want a side of food poisoning with your slice.