To steal someone’s thunder
To prevent someone from getting praise or attention by doing or saying what the other person was intending to do or say
e.g. I was so thrilled about my new car that I couldn’t wait to tell my parents but my brother stole my thunder and told them first.
It comes from the theatre in Victorian times when someone invented a sound effect machine to sound like thunder. A rival copied it. On discovering this, the inventor said, “he’s stolen my thunder!”