A cop saying “I’m a cop and you have to smash this window or someone will die!” is indeed a form of it, but there are others.
An undercover cop who pushes and prods and begs you to get them some pot until you give in is entrapment, even if they never reveal they’re a cop.
Only if they are actually coercing you (e.g. by physically threatening you). Asking really nicely or being annoying doesn't count.
For example, California's jury instructions on the defense:
https://www.justia.com/criminal/docs/calcrim/3400/3408/
> Some examples of entrapment might include conduct like badgering, persuasion by flattery or coaxing, repeated and insistent requests, or an appeal to friendship or sympathy.
Or SCOTUS:
https://en.wikipedia.org/wiki/Sherman_v._United_States
> Unanimously, the Court overturned the conviction of a recovering New York drug addict who had been repeatedly solicited for drug sales by a fellow former addict who was working with federal agents.
I.e. If a police officer talks you into selling drugs you're totally on the hook unless he said something along the lines of "I'm from the police, it's fine / you must".