I agree with Freddy if he could finish his sentence hahaha
Mold can cause a bad smell, so make sure your flower is properly dry before sealing it in a jar and make sure the humidity in the jar is around 55-60%
The fuller the jar, the lower you can aim and if it's quite empty you can go closer to 60%.
If you have mold, do not smoke you flower.