You do not need to find words that make everything better. A gentle offer of company or practical help can be a place to begin.
Let them lead
Ask what feels helpful and listen to the answer. Some people want to talk about their child; others may want quiet company. Use the name and language the family feels comfortable with.
Make a manageable offer
Offer something specific, such as bringing a meal or helping with an everyday errand. Make it easy to decline, and follow through on what you agree.
Keep in touch
Care can still be welcome after the first messages have stopped. A short note without an expectation of a reply leaves the choice with the family.
Give grief room
Avoid comparisons or promises about when someone will feel better. Ask before sharing news, photographs or details about the family with others.
yusraspromise.org.uk/resources/supporting-a-bereaved-family/