The Druid is probably your best bet.
There are two spells in 5e that nourish creatures: Create Food and Water, and Goodberry. Create Food and Water is a 3rd level spell and feeds 15 humanoids, and Goodberry is 1st level and creates enough food to nourish 10 humanoids. If your goal is keeping the largest number of travelers alive, Goodberry is your best bet.
Goodberry is a Druid and Ranger spell. If we assume a 5th level Druid is using half of their slots at every level, they can cast Goodberry 4 times (2x 1st level, 1x 2nd and 3rd level slots), which sustains 40 humanoids.
It's a little unclear whether "nourish" applies to both food and water or to just food only, but you can solve that with a Decanter of Endless Water (DMG 161), which is a relatively cheap uncommon magic item that solves any water issue.
Consider Druid 4/Ranger 1
Now, while the Druid can feed the most people, a Ranger with the Desert favored terrain might be more useful for a caravan, due to their Natural Explorer feature (PHB 91):
• Difficult terrain doesn’t slow your group’s travel.
• Your group can’t become lost except by magical means.
• Even when you are engaged in another activity while
traveling (such as foraging, navigating, or tracking),
you remain alert to danger.
All of these features seem pretty useful for a desert caravan. Using the same limits as the Druid, a single-classed ranger would only be able to feed 20 people, since they have 4 1st level slots and a single 2nd level slot.
However, a Druid 4/Ranger 1 would have the same feature but be able to feed 30 people, since they would have 3 2nd level slots, allowing for 1 extra cast of Goodberry. It's up to you to decide whether those nice Ranger abilities are worth the trade-off of feeding an extra 10 people.