Yellow and red cards were used to caution and send off players for the first time at the 1970 World Cup in Mexico.
West German referee Kurt Tschenscher showed the very first yellow card in football history in the 30th minute of the opening match, Mexico v USSR, to Soviet player Kakhi Asatiani for a foul on Gustavo Peña. The second and third yellow cards in football history also went to Soviet players — Givi Nodia and Evgeny Lovchev — in the 31st and 34th minutes respectively.

A full replay of the match in decent quality is available on FIFA+ (the first booking appears around 30:15 of the video).
The match was historic in another sense, too: the first substitution in World Cup history (though substitutions had already been used in club and international matches) also took place here — at half-time, Anatoly Puzach replaced Viktor Serebryanikov for the USSR.

A curious episode occurred in the 23rd minute (around 22:45 in the broadcast): Soviet goalkeeper Anzor Kavazashvili delayed releasing the ball, and Tschenscher awarded Mexico an indirect free kick inside the Soviet penalty area. Javier Guzmán’s shot was blocked by Lovchev.