This can be difficult. A lot will depend on your relationship with the person. You might start by saying that you have noticed some changes in them recently, that they have seemed quiet or down, and you could ask if they’d like some time to chat or maybe to go for a coffee together.
If they decline or don’t respond then you could let them know that you’re open to conversations in the future, just by saying you’re happy to talk (or listen!) if they change their mind.
You could do some training like this: https://www. zerosuicidealliance.com/ suicide-awareness-training if you want to learn more