Good listening is a real skill and isn’t easy. Try to really listen to what the other person is saying and show you’re taking time to digest this, don’t just wait for them to stop and then start talking straight away. Try not to interrupt as this can put people off opening up. You could ask what the person wants from the conversation, something like “I’m really happy to just listen, is that helpful?” Try to show you’re listening by your non verbal communication; eye contact, concentrating on them but not too intensely, nodding, making brief comments like “that sounds really tough” or something in your own words.
Maybe check in with them again in a few days to show that you’ve really heard what they were saying and have taken it seriously.