Avengers: Endgame ended with a 106 year-old Steve Rogers (Chris Evans) in the Marvel Cinematic Universe's year 2023, handing Sam Wilson (Anthony Mackie) his shield and effectively passing on to him the responsibilities of Captain America. Given his old age at that point, it's curious what happened to Cap following that exchange, and how long he lived afterwards.
With Thanos (Josh Brolin) and his minions defeated, the Avengers had one final mission to accomplish by the end of Endgame - return all the Infinity Stones to their original locations so as not to create multiple alternate timelines. Captain America took on the role using the technology that Tony Stark/Iron Man (Robert Downey Jr.) created, and the extra Pym particles he smuggled from the '70s. After accomplishing his goals, however, he didn't come straight back. Instead, he reunited with Peggy (Hayley Atwell) and lived a full life with her after finishing his task-at-hand. He only returned in 2023 to officially choose Sam as his Captain America successor.
Writers Christopher Markus and Stephen McFeely claim that the primary MCU continuity has always had an older Steve lurking in the shadows, while a younger one was actively involved with the Avengers. That notion means that old Steve spent at least 67 years with Peggy until her death during the events of Captain America: Civil War. Meanwhile, directors Joe and Anthony Russo have an entirely different scenario in mind, saying that by going back in time and staying with Peggy, Captain America actually created a branched timeline. Regardless of what's really the case here, the Captain America that returned at the end of Endgame returned to 1948, married Peggy and seems to have aged fairly normally since then.
There are a couple of determining factors regarding Steve's remaining living years including his age. According to visual effects producer Jen Underdahl they wanted to give Evans a "106-year-old super soldier look." Obviously that's way past an average person's lifespan, but he looks extremely good for his age - more like a man in his 70s or 80s. This has something to do with the effects of the Super Soldier serum, which presumably extended his lifespan by making his physical body more immune to wear and tear compared to a regular person's.
The most important element, however, in predicting what happens to Steve after he handed the shield to Sam is Marvel Studios' plans for the character. Like Downey, Evans' MCU contract ended in Avengers: Endgame and long before we learned what his superhero counterpart's fate was going to be, it was assumed that Avengers 4 will be his last outing as the Star Spangled Avenger. However, comments from the Russos imply that the actor will somehow still be involved in the franchise despite him essentially retiring as Captain America.
Considering the power of the Super Soldier serum, it won't be difficult for Marvel Studios to explain why old Steve is able to linger around despite his old age (if they indeed have more plans for him). That said, it's worth noting that in-universe, he's deemed dead, as evidenced in the tribute video shown at the beginning of Spider-Man: Far From Home so they have to take that into consideration if they're thinking of bringing him back. Perhaps Sam, Bruce and Bucky simply decided to keep Captain America's true fate a secret, and let the world think that he died during the battle with Thanos.