Fish can die for many reasons.
The method of collection, holding, and transport can have a lot to do with success. A very actively feeding fish is the answer to many of this type of doubts.
After that, the major consideration is that in a closed system many pathogens can become concentrated. Disease control is a large part of this hobby, especially if you are very interested in fish.
Preventive treatment and control are necessary, such as UV against pathogenic bacteria and treatment against protozoan diseases, and macro-parasites.
Your problem may well be bacterial and protozoan.