"Enchanted Village" is a science fiction short story by Canadian-American writer A. E. van Vogt, originally published in Other Worlds in July 1950.
He is trying to reach the shallow polar sea they saw as they approached, but after walking for days it is clear he has misjudged the distance.
Drinking a tiny bit of his remaining water, he explores the town and finds it to be completely alien.
Over the next days, Jenner attempts to teach the village how to cater to his needs, replacing the deadly food with something partially edible patterned on the crumbs from his pocket, and providing water after he drips out what remains in his bags.
The city serves food which is now a delicious meaty stew and he compliments his meal with a refreshing shower.