It's difficult really because grief is so complex, and nobody experiences it in the same way.
I think most people can empathise and there is usually some kind of understanding about your relationship to the person.
That said, some people can be utterly self-absorbed about grief and can only see it in their own terms.
I lost two babies, one was stillborn, one died shortly after she was born. Obviously we were devastated and even now I can't really find the words to describe how we felt, how we still feel, and how our grief affected us. You could see it on our faces though, for weeks, perhaps months we looked like we were wearing masks where everything was shown on our faces. Someone described us as looking stricken.
Most people were very understanding. My parents grieved for their grandchildren and for us, for their feelings of helplessness because they couldn't fix things for us.
My MIL was awful. She had lost her mother a couple of years before, which I haven't experienced so I don't want to comment on that compared to us losing a child. I'm not saying that losing a parent is not a terrible thing. The reason I mention it is because MIL reacted as though we had stolen something from her, some sort of status as the most grieving person in the family or something.
People had been very sympathetic and supportive of MIL and her loss, and I don't think that changed. Those same people were also commiserating with her about our children, her grandchildren, and offering support to her.
But they were doing it in part by asking how we were, saying how sorry for us they felt, and she reacted as though we'd lost our children just to upstage her somehow.
She was awful, she said terrible things to us about our babies, asked awful questions, threw a photograph away, told us they didn't count as proper grandchildren, finally conceded that "they are family…I suppose" and was just vile for months and years. I cut off all contact with her in the end, meaning she hasn't seen our third child since he was about 20 months old.
She certainly seems to believe in some kind of hierarchy, and she felt that we'd climbed ahead of her in it.
I suppose most other people we thinking the same thing. Some of them grieved with us, but without even mentioning it I'm sure that they also accepted that we were grieving more because they were our children, not theirs. MIL couldn't accept that, because in her eyes it meant she had lost something.
She compared her loss to ours and decided that we'd 'won' some kind of weird grief competition.
So I think there are at least two ways to describe a hierarchy of grief. The first is your way, where you have acknowledged that your cousin was closer to her grandmother than you were, so the loss is worse for her and you have shown support accordingly.
And then there's MIL's way, which is to see it as some sort of competition which she has won or lost.
I wouldn't want to be the one to decide where in any hierarchy any losses might come, because it's too general to make a neat little list, and relationships are complicated and feelings are unique. I'm still sorry for MIL that she lost her mother. I just wish she didn't see the losses and the grief as a competition which we 'won' by losing children.
I do think most people have enough empathy and self-awareness to know where they themselves might come in a hierarchy without feeling the need to mention it in an "I feel worse than you" way. You telling your cousin that you feel her loss is greater is different, it's showing support not demanding attention. I am sorry for the loss you have all experienced 