You can keep fish if you have a cat at home. However, please note the following:

Placement of the fish tank: Place the fish tank in a high place, ensuring that there is nowhere for the cat to climb or stand around. This will prevent the cat from accessing the fish tank or the fish.
Aquarium lid: It's best to have a lid on the aquarium, which can prevent cats from wandering in and also prevent fish from escaping.
Cat toys: Give the cat more other toys to distract it. If the cat bothers the fish, stop it in time. You can even spray them with a water bottle to tell them that this is a no-go zone.
Choosing a fish tank: Don't buy an open-top fish tank; it's best to buy a closed one. This will prevent your cat from drinking the water or reaching in to catch the fish. Also, the base of the fish tank should be heavy to prevent it from tipping over.
Cat's water: Provide your cat with an automatic water fountain to ensure that your cat has plenty of clean drinking water.