Cats normally use a litter box so if your cat suddenly stops using a litter box, that could be a sign of health problems that should be looked into immediately. In some cases, your cat may need to wear a diaper to keep from making a mess around your home, such as when a cat gets old.
Since it’s rare to find special cat diapers, consider using dog diapers instead. Also consider the size and the type such as disposable vs. reusable. Both have their pros and cons so do what’s best for you and your cat.