An expression that may come close to capturing both parts of the OP's request is:
steal someone's thunder (idiom)
To prevent someone from having success or getting attention, praise,
etc., by doing or saying whatever that person was planning to do or
say m-w
Win praise for oneself by preempting someone else's attempt to
impress.
Origin
From an exclamation by the English dramatist John Dennis
(1657–1734), who invented a method of simulating the sound of thunder
as a theatrical sound effect and used it in an unsuccessful play.
Shortly after his play came to the end of its short run he heard his
new thunder effects used at a performance of Macbeth, whereupon he is
said to have exclaimed: ‘Damn them! They will not let my play run, but
they steal my thunder!’. Lexico
Stealing thunder refers to a dissuasion tactic in which an individual
reveals potentially incriminating evidence first, for the purpose of
reducing its negative impact on an evaluative audience. We examined
whether it was necessary to frame the negative revelation in a manner
that downplayed its importance, and found that stealing thunder
successfully dissuaded mock jurors even without framing. We also
sought to determine the mechanism by which stealing thunder operated,
and found that stealing thunder led mock jurors to change the meaning
of incriminating evidence to be less damaging to the individual. "Stealing Thunder as a Courtroom Tactic
Revisited" (2003)