Gollum's tragic backstory evokes sympathy, as he was once a creature capable of love and friendship before the Ring consumed him.
https://lord-of-the-rings.org/books/gollum.html
His descent into madness and isolation serves as a cautionary tale about the dangers of greed and the loss of one's humanity.
Despite his often malevolent actions, there are moments of vulnerability and glimpses of his former self, which add depth to his character and elicit a mix of fear and pity from readers.