The are you ok conversation
how to ask and what to do with the answer

The question is easy, the conversation after it isn't. Here's a guide on how to actually have it.
ask
Pick a moment without an audience or a time constraint, a walk, a drive, side-by-side rather than face-to-face. If they say "I'm fine" but you're not convinced, don't let it go:
Try:
"For real though, how are you actually going?"
"I'm always here if you want to chat."
Then go quiet, let them fill the silence.
when they say “not really”
Your job isn’t to try and fix it, it’s to make them feel safe to keep talking
Try:
"That sounds really hard."
"Thank you for telling me."
"I’m here to listen, if you want to talk”
Don’t fill every pause, the goal is for them to feel heard.
what not to say
"Everything happens for a reason."
"It could be worse."
"Have you tried just not stressing?"
"You'll be fine, you're strong."
Each of these ends the conversation, even when it's meant kindly. You're not there to fix it, you're there to hear them.
encourage action
Once they've opened up, the next step is helping them figure out what could help. Start small before you go big.
Try:
"What do you think might help?"
"Have you thought about seeing your doctor?"
"Want me to look at a couple of support options with you?"
Just helping them find the next step.
plan a check-in
Schedule it in, don't leave it to chance.
Try:
"Can I check in with you again this week?"
"How about I call you Thursday?"
"When's a good time to chat again?"
A plan makes it easier for both of you to actually show up.