Brooklyn Nine-Nine's iconic open centered around Backstreet Boys' "I Want It That Way" was a last-minute addition. For a show that was famous for its hilariously random cold opens, occasionally delivering the episode's biggest laugh before the credits even roll, the Backstreet Boys tribute in season 5, episode 17 is seen by many to be the comedy's best. In it, a police lineup of suspects sing "I Want It That Way" to help the sister of a murder victim determine the culprit. Jake, however, gets predictably carried away.
https://screenrant.com/brooklyn-nine-nine-backstreet-boys-cold-open-last-minute-addition-details/