Cats are very secretive animals and are very good at disguising ailments. Cats very rarely show signs of acute pain - cats don't cry or scream. The most common sign of malaise is a change in the cat's behavior and a change in its normal daily routine. A cat that is not feeling well - refuses to eat, is lethargic, does not respond to owners, refuses to play or make contact, lies in a forced posture, not relaxed, etc. No one can see the slightest change in the cat's behavior better than the owner himself.
Answer: as soon as you notice that something has changed in the cat's behavior and daily routine.