James Gunn disclosed that he had written a cameo role for Marvel co-creator Stan Lee in the script of Guardians of the Galaxy Vol. 3.
However, Lee passed away before he could film it. Lee was famous for his short appearances in several Marvel films, with his last one being in Avengers: Endgame.
"I originally wrote Lambshank, the character I played, for Stan Lee," Gunn explained. "Because I wrote the movie before Stan passed on, and I also knew he was getting much older, and it would be hard to bring him to Atlanta to shoot, so I did a character that I could just animate and then have him do the voice and have a little Stan Lee-like face on the character, but unfortunately, Stan passed – who I really enjoyed working with and directing so many times over these movies."
Starting with 2000's X-Men, Stan Lee made appearances in several Marvel films over the years. He first appeared in the Marvel Cinematic Universe in Jon Favreau's Iron Man in 2008, which marked the beginning of the MCU.
In the movie, Lee appeared at a fancy gala and was mistakenly identified by Robert Downey Jr.'s character, Tony Stark, as Hugh Hefner.