This next part is serious, so perk up your ears. Any frosting left at room temperature for more than two hours (or one hour if it’s a hot day) should be tossed. Bacteria love butter and sugar just as much as you do.
I know, it hurts. You want to scrape that leftover frosting off the serving plate and save it. But unless you love food poisoning, show some tough love and dump it. Your future self will thank you when you’re not hugging the toilet.