There are many causes and almost all are treated differently: everything from intestinal parasites (take your veterinarian
multiple fecal samples to fully rule these out), food intolerance / allergies, metabolic disease (diabetes mellitus, hyperthyroidism, etc), liver disease, pancreatic issues (rare in a cat), inflammatory bowel disease, etc..
Very fresh
fecal samples are needed to detect tapeworms, and it may take
multiple samples being evaluated over the course of a few days to find the tapeworm proglottids (egg cases) or ova (which may be free - floating if the proglottid has ruptured).