Cats have vertical slits because their prey animals consist of rodents (ground) and birds (air). The slit gives them a larger vertical field of view. Imagine viewing life like a TikTok influencer.
Some prey animals (goats) have horizontal slits so they can more easily watch for predators.