The similarities between the two men may have contributed Steve's decision to pass the moniker to Sam in the final minutes of Avengers: Endgame.
Sam Wilson is the best choice to succeed Steve Rogers as Captain America because his story mirrors Steve's better than Bucky. Anticipating Chris Evans' imminent departure from the MCU, many fans speculated which of Steve's close allies would take up the mantel since both Sam and Bucky Barnes have previously shared the honor in the comics. At long last, the final minutes of Avengers: Endgame revealed Steve's decision to pass the moniker to Sam, regardless of his longer history with Bucky.
Both Sam and Bucky play hugely influential roles in Steve's life and cinematic journey. Bucky Barnes was first introduced in Captain America: The First Avenger as a young military man and Roger's long-time friend and protector. After Steve's transformation into the Star-Spangled hero, he and Bucky are reunited only to have Bucky seemingly killed on a mission. The character resurfaces in Captain America: Winter Soldier, playing the titular brainwashed quasi-antagonist. It is in this sequel film that Sam Wilson, a former pararescue airman, first enters the scene, becoming a new ally to Cap. Displaying great compassion while helping soldiers suffering from PTSD, Sam soon confides in Steve, revealing that his own wing-man, Riley, was also killed in battle.
Introduced as a sickly and small young man, Steve Rogers refuses to be deterred by his physical limitations, aspiring to join the army and protect the world from "bullies." Similarly, Sam bravely takes on the likes of The HYDRA-infiltrated S.H.I.E.L.D and Thanos without the aid of superpowers. That determination would likely have resonated with Steve, who did not let his own physical limitations get in the way of being heroic. Sam has similarly been something of an "underdog" during his tenure with the Avengers (a team populated with super soldiers, genetically enhanced persons, and an Asgardian god), but never let that stand in his way. In short, both Sam and Steve have MCU arcs that allow them to overcome their relative "normalness" to become heroes.
By contrast, Bucky's super strength and bionic arm as The Winter Soldier (both acquired after torture and experimentation at the hands of HYDRA) put him on par with his more powerful comrades, unlike Sam and a pre-Super-Soldier-Serum-Steve. And while Sam could have presumably led a normal, non-superheroic life, Bucky's is somewhat limited by his own tragic circumstances. With Bucky's ties to his former life irrevocably severed, he was a wanted man with nowhere else to go until he was "healed" in Wakanda. While Bucky's journey has been dictated by his considerable trauma, Sam and Steve have more agency in determining their ultimate fates.
Crucially, both Sam and Steve are unafraid to go against the status quo while in pursuit of their goals, even if their actions come into conflict with the "establishment" - which is an interesting perspective for characters draped in American iconography and symbolism to have. In Captain America: Winter Soldier, the duo defies marching orders after learning that HYDRA has infiltrated S.H.I.E.L.D. Then in Captain America: Civil War, Sam joins Steve in rejecting the Sokovia Accords, despite the demands of the government. Bucky, on the other hand, has been long-removed from his American origins, having spent decades leading a more nomadic existence as the Winter Soldier and acting far more discreetly.
With the eventual release of Falcon and the Winter Soldier on Disney+, it is possible that the two titular heroes will have a conversation regarding Steve's decision to pass the vibranium shield to Sam over Bucky. But given the latter's not-so-subtle nod of approval prior to Steve's ultimate decision in Avengers: Endgame, it is clear that even the Winter Solider agrees that Sam is a worthy successor. And it seems only fitting that Bucky will continue to serve as Captain America's right-hand-man in the MCU's exciting new era.