I've been able to rattle off some advice for people hoping to comfort a friend as they grieve this loss. Mostly I tell them to have their friend seek out support because it makes such a difference to not feel alone. Loss is isolating. You can feel alone in a room of 1,000 people if those 1,000 people haven't felt your pain.
And then I tell them to go out of their way to talk about their friend's lost child by name. Say their name. Reference them. Take time on a random Tuesday afternoon to say "remember when..." or "I was just thinking about..." Take time on the holidays to do something kind in honor of the child who won't be sitting under the tree unwrapping gifts that year. Tell your friend "I bought the person in line behind me their cup of coffee to pay it forward for ____ today." On birthdays, tell your friend that you're remembering their child on their birthday. Light a candle for them. Tell your friend that you've donated something in the child's honor.
And never think "but what if it makes them sad?" I can promise you that hearing their child's name, that knowing their child is being remembered on that every day, will be 100 steps forward in their healing journey.