Often precautions involve maintaining a stable aquarium that is adjusted for the specific species of fish that are kept and not over-crowding a tank or over-feeding the fish. Common preventive strategies include avoiding the introduction of infected fish, invertebrates or plants by quarantining new additions before adding them to an established tank, and discarding water from external sources rather than  mixing it with clean water.
To prevent problems in aquariums, it's important to maintain a stable environment that is suitable for the specific fish species being kept. This includes avoiding overcrowding, overfeeding, and introducing new additions without proper quarantine.  Additionally, using external water sources should be avoided by discarding any contaminated water instead of mixing it with clean water.