Wonderful question. I have emailed/texted/messaged people and said, “I have written a letter of gratitude to you and I would like to mail it to you. Could you tell me what your physical mailing address is?” Sometimes people misread this and think I want their email address, so I sometimes have to clarify. Putting “physical” in front of “mailing address” is an attempt clarify up-front. I have followed-up with “this is an old-fashioned letter written on paper using a pen …” to clarify.
I have also mailed letters to people’s work addresses. If I know who they work for then I can find their address. I have found the mailing addresses of small start-ups that don’t really have a physical HQ, using sleuthing on the internet.
It seems like there is usually a way to get a physical address. If you can’t get a physical address then you could scan the letter and send it by email or messaging app. Someone sent me a letter of gratitude that way recently, sending a scanned letter to my work email address.