Are there good ways to avoid typhoid?

Food hygiene/vaccine. Typhoid fever is a common (worldwide) infection with salmonella typhi bacteria caught via fecally contaminated food and water (human poop in your food or water. Yuck, but happens). Be careful what you eat ("boil it, peel it, cook it, or forget it"). There are two vaccines (oral & injection) available which work reasonably well. Also gastric acidity helps, so extra caution if you take antacids!