What can I do if someone I work with is having a hard time but won't talk to HR?

You don't need HR's involvement to point a colleague towards support, a lot of people avoid HR specifically because they don't want it to feel official.
That instinct is common and often reasonable. People worry about it affecting how they're seen at work, going on a record somewhere, or becoming a "performance conversation" in disguise.
You can still help without routing it through a formal process.
Options that don't require HR:
Share something anonymously usable, like a wellbeing platform they can access privately
Offer to sit with them while they figure out next steps, without pushing HR as the only route
Let them know support exists outside the official channel, if that's what's stopping them
This is exactly the gap Ark is built for support a colleague can access directly and privately, without it going through a manager or HR system first.
Link to share: app.arkspace.co