there are three* questions that can help you when someone comes to you with a problem they're experiencing:
1. are we processing or planning?
this is the one you hear about in romantic relationships, where one partner wants to vent and the other starts trying to move the world instead of listening. listening is the first thing.
2. do you want my help?
please, *please* be prepared to accept no. the first time. and they may still want your advice.
3. do you want me to help you do this or to do this for you?
*only* if there's a yes on 2. it's situational! if something is hard for them but trivial for you, they may prefer for you to just do it. other times they may just want support, or help with a specific aspect. a request for help is not a surrender of autonomy.
* there are more than three, but roughly these three in roughly this order tend to help me in that situation. and sometimes they've already volunteered some of this information. listening is first.