YA or kids’ book, fantasy or magical realism. Protagonist is a young girl. She gets sent to the store to buy something with a wick — either an air freshener or a candle? The one she buys is the last on the shelf, it’s in a dented can, and it smells like something you wouldn’t want air freshener to smell like. I think it’s either cabbages or broccoli. It’s also magical, and either gives her access to a magical world or brings her a friend/companion from a magical world. That’s all in the book’s set-up, like in the first chapter. No idea what happens from there.
Really long shot, thinking of books with bad smells: The Hateful Plateful Trick, by Scott Corbett. One of the magic chemistry set series with Kirby and Fenton plus Kirby’s young (female) cousin.
“The Trouble With Magic” by Ruth Chew? I think the girl (and her brother) buy air freshener to cover up the smell of cabbage, and a wizard has been trapped in the can and has been eating the wick. He can perform magic for them with his umbrella, but only when it is raining.