A dying person most needs to be shown as unconditional a love as possible, released from all expectations. Don’t think you have to be an expert in any way. Be natural, be yourself, be a true friend, and the dying person will be reassured that you are really with them, communicating with them simply and as an equal, as one human being to another.
I have said, “Show the dying person unconditional love,” but in some situations that is far from easy. We may have a long history of suffering with the person, we may feel guilty about what we have done to the person in the past, or anger and resentment at what the person has done to us.