99% of the time it is poor water conditions that cause fish deaths. You have to remember that a fish tank is a living environment. I'm sure I'm not telling you anything you don't already know but You can't just fill an aquarium with water and expect things to live happily ever after. You have to create a safe living environment before fish will survive. That's why goldfish don't last very long when people take them home from fairs, they just plonk them in tap water and expect them to live. Thankfully, the practice of giving away goldfish at fairs has been mostly stamped out in the UK.
If you are suffering from fish deaths, the first thing you need to check is ammonia and nitrite. These two elements are highly toxic and will either cause harm or kill your fish if present for too long. If you can test for these and give us the results, then we will be able to advise