It should go without saying that the health of your fish is a product of multiple variables - genetics, physical environment, diet, age, etc. As an aquarist, you have control over some of these. One of the variables that's easiest to control is the fishes' diet. After all, the aquarium is a closed environment, and food must be introduced into it - unless your fish feed on each other or something else that grows in the tank.
There are plenty of food options available. Providing a laundry list of what cichlid foods are best isn't the point of this post. What I will say is that variety is beneficial.
My Tanganyikan food pantry consists of 15 different dry foods, from which I generally feed them a three food combination each day. Mathematically, this means I could feed them a different combination once a day for 455 consecutive days before they eat the same three foods together.
The Cichlid Room Companion
Tropical Fish Hobbyist
American Cichlid Assoc.
African Cichlid Hub