> You can’t tell if someone is looking for advice or support and connection.
You can always ask. Seriously! Some communications books literally recommend you ask whether they want support/connection/advice.
And you will rarely go wrong if you commiserate. So: Commiserate first, and then say "I have some ideas on what may help, ... " and what follows is context dependent.
If it's a chronic health issue that you have not dealt with: "but you probably know more about this than I do and probably don't want to hear yet another idea."
If it's a chronic health issue that you have dealt with: "and they solved a similar problem I had, but I'm not sure your situation is the same as mine."
Trust me - if they want to hear your solution, they will then ask.
If it's very generic advice that people commonly treat as a panacea (e.g. diet, exercise, supplements, meditation, mindfulness), better to commiserate and keep your advice to yourself.