Sam was a gardener who was able to resist the ring better than anyone but Frodo. I would peg him for a Druid (a wisdom/nature class) with the folk hero or acolyte background. Folk Hero is where his heart is, regardless if he has the renown yet, or as an acolyte of nature. For race, definitely strongheart halfling.

If you want a full build suggestion:
Samwise
Folk Hero
Strongheart Halfling
Druid (Land)
Str 12
Con 16
Dex 16*
Int 8
Wis 14*
Cha 8
*The caveat here would be to swap Dex and Wis if we can switch racial bonuses

Folk Hero's skills fit really well, Animal Handling and Survival are both flavorful and wisdom based.
Additional skills: Perception and Insight(seeing through Gollum's BS).
You could even out the strength and intelligence to 10 each and pick up Nature instead if you want to capture how LOTR treats hobbits as much weaker than humans in general.

For cantrips I'd suggest guidance (he is always laying down the folksy inspiration) and produce flame (since he is in charge of the campfires). Produce flame isn't really optimal, I would go with thornwhip if you care more about combat efficacy.

For prepped spells theme wise, animal friendship/speak with animals (to represent his relationship with good ol' Bill the Pony), and goodberry for the scavenging (and a little nod to Goldberry). Again, not combat optimal though, so I'd probably go with thunderwave, healing word, and either faerie fire or entangle as your concentration spell.

Weapon wise a dagger/scimitar would play to the halflings dex, especially if you start with a 16.

Finally, it's a bit of a stretch, but you can blame the wildshape on some long forgotten relation to Beorn.


Back from timeout.