Cats are not born to use litter boxes. For domestic cats, they can learn the knowledge of using litter boxes from their mothers when they are 1 month old, while cats who have been wandering in the wild for a long time know nothing about litter boxes. If you adopt a stray cat, you will face the problem of teaching them to use the litter box.
First, you should choose a litter box suitable for cats. For example, newborn kittens should use litter boxes with lower outer edges, which is more convenient for them to climb in and out. Adult cats don't have to worry about this problem at all, and their owners can choose at will.
Secondly, cats are very hygienic animals. So, don't put the garbage basin near their food basin and water basin, otherwise they will ignore the garbage basin and find other places to solve their internal emergencies.
Third, when you bring your cats home, let them stay in the litter box to adapt to the environment in the box and feel the texture of the litter box. You can also flip the cat litter with your fingers to show them that urine and feces can be buried here. Especially young cats, you should put them in the litter box after waking up to eat. Once you start using bedpans, you don't have to worry about them defecating elsewhere.
Fourth, after putting cats in the litter box, you'd better not stare at them all the time, so they will feel scared. You can pretend to ignore them, or go to another room. Cats can relax their vigilance before defecating. In addition, you should clean the litter box for the cat every day, because the cat doesn't want to step into a dirty place.
Finally, what you need to pay attention to is that you can't punish the cat during the whole training process. Cats are very sensitive animals. If they are punished only once, they will have infinite fear of the litter box. Later, they will find places where they feel safe to defecate, such as your closet, under the bed and so on. In order for the cat to learn to use the litter box, you must be patient.