Karl Gallagher received the wound after he had stopped off at West Cross Shopping Centre in Smethwick on April 26 this year.
Mr Gallagher, who had arrived with three others as a passenger in a black Seat Leon, had been waiting for pizza from Fast 1 Pizza & Grill, a court heard.
Tyrelle Harris, who denies murder on the grounds of self-defence, had arrived with others shortly after at 4.30pm.
Mr Gallagher approached the other group with Harris, 19, walking forward to meet him, Mrs Sarah Whitehouse QC, prosecuting, said.
Mrs Whitehouse said the victim had “backed away” after Harris “plunged” a blade into Mr Gallagher’s chest.
The 31-year-old victim, a personal trainer, fell to the ground and was pronounced dead at 5.21pm by paramedics, Wolverhampton Crown Court heard.
Mr Gallagher, who lived in Smethwick, had a three-centimetre stab wound which had ruptured a main artery, a judge heard.
The defendant had fled from the scene with others in a car, heading to Orchid Close where Harris allegedly disposed of the knife, Mrs Whitehouse said.
Officers found the defendant hiding in the attic two days later on April 28 at a flat in Netherton, a court heard.
Harris, of Helvellyn Way, in West Bromwich, has pleaded not guilty to murder but has pleaded guilty to having an bladed article. The trial continues.