Sam Gamgee is the true hero of The Lord of the Rings because he represents the kind of courage that history usually overlooks.
Tolkien himself saw Sam as a reflection of the ordinary English soldiers he knew in World War I: loyal, steady, humble, and stronger than they appeared.
Sam helped get the Ring to Mount Doom in almost every way that matters. He keeps Frodo alive. He cooks, gathers food, carries gear, finds water, watches over him while he sleeps, and keeps moving when Frodo is too weak to think clearly. He also provides moral strength. When Frodo starts to collapse under the Ring’s weight, Sam encourages him, reminds him of what they are fighting for, and refuses to let despair win.
In Moria and later on the road, he protects Frodo in danger. He is the one who suspects Gollum early and keeps a close eye on him. When Shelob attacks, Sam fights her, believes Frodo is dead, and for a moment takes the Ring so the mission can continue.
Then, after learning Frodo is still alive, he enters the tower of Cirith Ungol, rescues him, and returns the Ring. Near the end, when Frodo can barely walk, Sam literally carries him up Mount Doom. That image says everything. Frodo bears the Ring, but Sam makes it possible for the Ring-bearer to reach the end.
What makes Sam so important is that he does not help through power, rank, or special gifts. He helps through loyalty, endurance, plain courage, and love.
Without Aragorn, Gandalf, or others, the war would have gone badly.
Without Sam, the Ring almost certainly never reaches the fire.