Person A has just told you something seriously bad or sad or difficult. You want to say something positive. You want the person to not feel alone. It’s those generous impulses that will lead you astray.
“I understand…
“A similar thing once happened to me…
“I can imagine…
These responses deny the uniqueness and depth of the issue. Person A has been thinking about whatever this thing is for countless hours and you think you instantly comprehend? At some point, it may be prudent to express understanding and solidarity, but almost never after an initial reveal.