Sometimes you can lose your sense of smell temporarily due to nasal congestion or allergies or even because of a cold or sinus infection etc.
You can also lose your sense of smell due to small non cancerous growths in the nose and your nasal passages that are called Polyps.
Head trauma that causes damage to your nerves that allow you to smell can also be a cause of permanent loss of sense of smell or damage to your nose.