step in it
Intermédiaire supérieur (B2) informal
Accidentally do or say something that causes a problem or embarrassment — like stepping in dog poo without noticing.
"He really stepped in it when he made that joke about the boss in front of the whole team."