This claim is false. Although there have been reports of animals, as far back as 373 B.C.E., showing anxiety or behaving strangely before an earthquake, according to an article from the American Kennel Club, “there’s no conclusive scientific evidence yet that dogs can predict tremors.” Some scientists believe that they could be sensing foreshocks, smaller waves, or noises generated from underground rock movement. Given this, it’s probable that dogs are only reacting to the small changes underground that occur right before an earthquake that humans simply cannot detect. In addition, a study was performed that correlated a smaller dog’s head size to a higher sensitivity when it came to high-frequency seismic sounds. This study also found that out of 14 dogs in the study that had a hearing impairment, thirteen of them did not show higher levels of anxiety.
Apart from anecdotal evidence, there is also no hard evidence to say that cats can “predict” earthquakes. Like dogs, cats have much better hearing than humans, which allows them to be more aware of the slightest sounds underground. On top of this, their sensitive paws and whiskers allow them to pick up on the tiniest of vibrations.
So no, cats, dogs, and other animals are not able to predict earthquakes, but rather, they are able to pick up on them much earlier than humans are. With their strong hearing abilities and their sensitivity to higher frequency sounds, they are great at detecting seismic activity.
https://www.akc.org/expert-advice/lifestyle/can-dogs-predict-earthquakes/
https://www.psychologytoday.com/us/blog/canine-corner/201205/can-dogs-predict-earthquakes
https://www.catster.com/cat-behavior/can-cats-sense-earthquakes/