I’m sorry to hear that about your cat. From what you’ve mentioned, it seems like your cat is showing symptoms of kidney problems. Signs of which include litter box aversion & constipation.
I would recommend for you to see your local Vet and get your cat checked properly. From there, they’ll be able to give you a definite next step.