What's the next best thing to do to support someone in their journey of overall well-being?

A few weeks ago, I was amongst a group of people having dinner. During the conversation, because it was relevant to the topic at that point of the discussion, one person had brought up about their problem of being unable to eat anything daily. It was some sort of condition and doctors are requesting them to eat something at least daily but they're unable to eat at all. When they said that my heart sank.

I was little unsure of what to say or not to say. In hindsight I think when I'm unsure in such situations, the best option indeed was to just stay silent. But I know for a fact, that these kinds of things in people's lives will pop up now and then during conversations. But if I don't know what to recommend or not recommend, I was thinking maybe I should just get them to talk more about it and just be there and listen for them? Because I think when they're by themselves they undergo tremendous amount of struggle and dark moments.

If not for advice that could potentially resolve their issue, do you guys think the next best thing to do is support them by just listening to them? Even though the problem won't get resolved, this might at least give some temporary relief by talking and letting it all out perhaps.

Or what do you guys do or suggest doing in such situations?