I am sorry to hear about your loss.
It is narrated that the Prophet (S) said: “Keep many domestic animals (al-dawajin) in your houses so that the shayatin (demons) are occupied with them instead of with your children.” (See Tibb al-A'immah)
I think there is some truth to this.
Of course, maybe your cat just died and there was no other reason for it. The lifespan of animals is also in the hands of Allah, and this life is transitory for all of us.
At least you got to enjoy some time together, and one thing I have always admired about animals is that they handle death with grace and acceptance.
With salaams and du'as