Fish produce ammonia as a byproduct of their metabolic processes and excretion. In a properly balanced aquarium, beneficial bacteria in the filter system convert ammonia into nitrite and then into nitrate, which is less harmful to fish. However, when the level of ammonia exceeds what the bacteria can process, it can become toxic to the fish in the aquarium.
Overcrowding, inadequate or inefficient filtration, and infrequent water changes can contribute to elevated levels of ammonia in an aquarium. Poor water quality and inadequate maintenance can lead to ammonia spikes that can be detrimental to the health of all the fish in the aquarium, not just the goldfish.
It's important to monitor water parameters regularly, including ammonia levels, to ensure the aquarium environment is suitable and safe for all inhabitants. Regular partial water changes and maintaining proper filtration and water quality can help prevent the accumulation of toxic levels of ammonia and protect the fish in the aquarium.