I told her I was sorry for her loss
That was nice of you. Did you say anything else?
I said that because I didn't know how to respond after the recent loss.
It is hard to find words to give others comfort after a loss but just by being there and acknowledging her loss, you were giving her comfort. It will make her feel better.
That's great. I just wasn't sure how to respond to the situation since it's awful to lose a beloved one and I said what I thought would be appropriate.
You did well. There are no good words for the situation but letting her know you care was a good thing.