'You have the right to remain silent' comes from a 1966 court case
Ernesto Miranda confessed to police in Arizona without being told he could stay silent or have a lawyer. In 1966 the US Supreme Court overturned his conviction, ruling that suspects in custody must be warned of those rights before questioning. Miranda was retried and convicted using other evidence. The warnings, familiar from countless TV shows, became standard US police practice.
— Supreme Court of the United States, Miranda v. Arizona — 384 U.S. 436 (1966)