Despite it being billed as an Avengers movie, the Guardians of the Galaxy played a very prominent role in 2018’s Avengers: Infinity War, as directors Anthony and Joe Russo took the team of cosmic superheroes established by James Gunn and paired them up with Earth’s Mightiest Heroes for the battle against Thanos.
However, it seems things could have been very different, as Gunn has revealed during a watch party for Guardians of the Galaxy Vol. 2 that the team were originally only earmarked for a cameo appearance in Infinity War:
https://twitter.com/JamesGunn/status/1253493895918268417
As it happened, Infinity War led to a major shake-up for the Guardians with the death of Gamora (an event which will presumably factor heavily in the plot for Guardians of the Galaxy Vol. 3), and Gunn went on to reveal that he was part of the decision to kill off the character:
https://twitter.com/JamesGunn/status/1253509400674746368
Avengers: Infinity War stars Robert Downey Jr. (Iron Man), Chris Evans (Captain America), Mark Ruffalo (Hulk), Chris Hemsworth (Thor), Scarlett Johansson (Black Widow), Chadwick Boseman (Black Panther), Tom Holland (Spider-Man), Sebastian Stan (Winter Soldier), Anthony Mackie (Falcon), Paul Bettany (Vision), Elizabeth Olsen (Scarlet Witch), Don Cheadle (War Machine), Josh Brolin (Thanos), Benedict Cumberbatch (Doctor Strange), Benedict Wong (Wong), Chris Pratt (Star-Lord), Zoe Saldana (Gamora), Dave Bautista (Drax), Bradley Cooper (Rocket), Sean Gunn (Rocket), Vin Diesel (Groot), Karen Gillan (Nebula), Pom Klementieff (Mantis), Tom Hiddleston (Loki), Samuel L. Jackson (Nick Fury), Cobie Smulders (Maria Hill), Benicio Del Toro (The Collector), Danai Gurira (Okoye), Letitia Wright (Shuri), Winston Duke (M’Baku), Terry Notary (Cull Obsidian), Tom Vaughan-Lawlor (Ebony Maw), Carrie Coon (Proxima Midnight), Michael James Shaw (Corvus Glaive) and Peter Dinklage (Eitri).