At the end of Avengers: Endgame, Steve Rogers makes an important choice without seeming to make any choice at all. After going back to the past to return the Infinity Stones and Mjolnir (in order to avoid disrupting the other timelines created by their shenanigans), Rogers stays in the past so he can live a normal, superhero-free life with Peggy Carter. Then, once he catches back up to the present as an old man, he presents Sam Wilson/The Falcon with his shield—and therefore the mantle of Captain America. It wasn’t a particular surprising choice, but the thing that was surprising was the way Sam was automatically accepted as the right choice, even though Bucky Barnes was right there and also has a bit of the enhanced abilities that are theoretically important to being Captain America (not to mention a cool robot arm).
Now, speaking with Wired, Endgame directors Joe and Anthony Russo have directly explained why Sam Wilson was the obvious choice for the shield, saying that Bucky has a “complicated history” and a “damaged mind,” and you don’t want to give something as important as the Captain America identity to “somebody who is vulnerable like that.” That seems like a sad dismissal of a guy who has spent several Marvel movies proving that he’s not defined by the dark things he did as a brainwashed assassin, but it’s probably intended more as a reflection of just how much respect Sam earned since joining the team. In other words, Bucky is too vulnerable to be Captain America, but even though Sam Wilson is just a regular guy with regular arms, he’s not.
Of course, when Captain America “died” in the comics (he was actually stuck in a mind prison or something), Bucky Barnes was the one who picked up the shield and put on a shiny, slightly more emo version of the star-spangled Cap suit. The movies have never been particularly dedicated to the canon of the comics, though, which is why movie-Cap was allowed to grow old and live a happy life with Peggy Carter instead of getting trapped in a mind prison. Also, comic book Sam Wilson took on the mantle of Captain America more recently than Bucky did, picking up the shield just a few years ago when Steve Rogers was turned into an old man (through comic book science, not regular aging). Basically, they both have relevant Captain America experience, but it’s a testament to how much good superhero work Sam Wilson has done that movie-Steve didn’t even consider giving the shield to his oldest friend Bucky Barnes.
Anyway, Bucky and The Falcon will soon meet again in their spin-off show.