Steal (someone`s) thunder

To do or say something that another person had planned to do or say.

My colleague stole my thunder when he announced that he was leaving the company before I will.