Packaged consumables like coffee, tea, and chocolates are generally the least troublesome things in a suitcase, and most countries let them in freely within personal-use quantities, counted against the general goods value allowance rather than any special food quota. A few countries do set specific quantity limits on coffee and tea alongside their alcohol and tobacco allowances, a quirk worth checking for your destination.
Packaging is the practical make-or-break: commercially sealed products with ingredient labels clear inspection quickly, while homemade, unlabeled, or opened items invite scrutiny because officers cannot verify what they contain. Anything with meat, dairy, egg, or honey content can trip biosecurity rules even in chocolate or snack form in the strictest countries.
Quantity is the other tell, since a few gift boxes read as personal while a suitcase full of identical items reads as commercial. Declare food when the arrival form asks, and check the destination's customs and biosecurity pages if you are carrying anything beyond sealed supermarket staples.