Cats may not be able to hold grudges because they have no memory or a very short memory.
Cats are very perceptive animals; they remember who fed them and who treated them badly. However, cats typically don't remember a particular incident, especially if it happened a long time ago. So, even if your cat has been hit, it may not remember it.

Of course, this isn't true for all cats. Some cats may have stronger memories and might remember specific events. However, most cats don't hold grudges because they don't have the memory or the interest to do so.
Additionally, cats may choose to forget unpleasant experiences because they want to live peacefully with humans. Therefore, even if your cat has been hit, it may choose to forget about it rather than hold a grudge.