We are terrible at knowing what somebody else needs or wants in relation to grief.
I've just lost a second person to suicide in 3 months. I've got to go though the whole thing again, only last time it was a close friend, this time a new boyfriend, and I can't even understand what I'm supposed to do/feel this time, let alone expect anybody else to! I generally wanted people to know about my friend for practical reasons I.e. I'm going to be a bit quiet and red eyed for a few days. Please tactfully ignore that, I'll mention it when I'm ready. I'm going to need to take time off for the funeral etc. Please do not give me any sympathy, because sympathy upset the precious balance that was keeping me from being a sobbing mess at inappropriate times. I also rarely wanted to cry in front of people if I could help it, I much prefer that by myself in private. Well meaning people doing anything other than just being with me while I fell apart did huge damage - I haven't yet been able to speak properly to clear the air with the friend who mistook my words "I'm struggling" to be a request to be told how to grieve better - all I took away from that was "you're doing grieving wrong" which was an incredibly hurtful message. It was totally normal that I was struggling, I didn't need or want fixing, I needed somebody to hold the space while I went through it without judging or trying to fix me.
It's upsetting when people don't mention it. It's upsetting when they try to fix it. It's upsetting when they try to minimize it. It's unhelpful when they show sympathy when you're working really hard to keep a fragile veneer of having your shit together. Even those of us who are usually good at communicating what we want or need are often too fragile to know what we want or need ourselves, let alone communicate it effectively.
My best advice for what to do or say is to find a quiet moment when if you break their veneer they can pull it back together in privacy, and acknowledge the death. "I'm really sorry to hear about your loss" is enough. If you have capacity to offer somebody to talk to, or to give practical help for the funeral etc, then offer specifically that. If they talk to you, listen. Don't try to fix. Offer but don't assume a hug... or tea, tea is always a good offer! Over time, mention the deceased person occasionally, if it seems welcome. There's nothing weirder than everybody pretending they never existed.