I am sorry about your kittys passing. I do think she knew you would love her till the end and were what she needed so she came home to die with you.
So sorry you lost your darling kitty. Don’t beat yourself up about what you could have done, it was her time. It’s impressive that she came home to you to die as many times an animals instinct is to go away and hide when they are dying.
You’re wonderful for caring about her so much