The main source of ammonia is the bioload.
People correctly mention the aerobic bacteria to convert ammonia to nitrItes and then nitrates.
however, plant life like macro algae (and even algae in rocks) prefer to consume the ammonia directly, which can prevent the ammonia spike. Plus the algae...