Anything with a scent needs to be stored away from your tent to prevent bears from becoming interested in the place you are sleeping.
Place all scented items at least 100′ away from your tent. Either properly hung or in a bear-resistant canister.
This includes: toothpaste, deodorant, food, and any food wrappers.
Bear Canisters
Required in many places because they are (mostly) fool-proof. If you are backpacking in Grand Teton National Park, these are provided to you when you acquire a backcountry permit.
Easy to use and no hanging required but are heavier to carry. Don’t store near a hillside or a body of water. Bears sometimes try to roll them away
Hanging
Hanging kits are often lighter weight and less bulky if the place you are going allows this. Some established backcountry campgrounds even have posts installed for hanging. Hanging takes more skill and experience.