The reason Ranni had Godwyn killed was for a ritual. She wanted to destroy her body but preserve her soul in a doll. This way, she could escape her destiny and not be bound by the whims of the Greater Will like the rest of her family. It was this act that really made the plot of Elden Ring begin.