A dead fish or other things such as snails and other invertebrates are often very smelly when rotting which has lain undiscovered in, under, or behind a decoration or has gotten caught in some part of the filter - or possibly that has just been floating around unnoticed and unremoved.
Uneaten, excess food that was not promptly removed from the tank after the fish finished eating Dead plants or parts of plants that have not been promptly removed from the tank. rotting roots etc. last of all Insufficient water changes, insufficient filter maintenance.you might not have enough filtration or water movement in the tank.You must do a weekly 10-15% water changes.