Sam was vital to Frodo but Frodo was the one carrying the source of pure evil and sin on his person the whole trip. No one can take away Sam's contribution to his master's - and all of Middle-earth's - salvation, but there's a reason Frodo is the first mortal ever invited to live in the Blessed Realm.