You may remember it from the old days, when your mother put a sliced onion on a saucer next to your bed when you had a cold. Does it really help?
An onion cannot cure a cold. The volatile components in an onion can ensure that your nose and airways open a little more. It only works temporarily, but it can help you fall asleep better when you have a cold. You have to take the smell for granted, but if you have a cold, you won't smell very much.