I posted this in a movies sub and a few Redditors mentioned video games.
GTA V has Trevor kill Johnny from the previous game early on
The Last of Us Part 2 (which I haven’t played) kills off Joel at the start
Honorable mention: Mass Effect 2 has Commander Shepard die at the beginning but he’s instantly resurrected
What other games do this?
If you counting resurrection J.B. Blastawitz - Wolfenstien New Colasus
Lou Kang - Mortal Kombat: Dean Alliance
This kind of obscure since I don’t think this game, while well known, is well known for any particular story or characters, but Joe Ramirez is killed off at the very beginning of Ghost Recon Future Soldier.
In Gears of War 3 Prescott is killed in the first act of the game.
In Halo 5 the main antagonist of Spartan Ops is killed in a cutscene in the first mission, and in Halo Infinite several main characters are killed offscreen before the game begins.
In the God of War series Kratos dies and then climbs his way out of Hades
Twice
Three times even, but the first time is late in the game
If it counts, Lufia and the Fortress of Doom’s prologue kills off Maxim and Selene, who end up being the main characters of Lufia 2: Rise of the Sinistrels.