H. pylori is primarily transmitted via the fecal-oral route or the oral-oral route. Contaminated food, water, or utensils can facilitate the spread of the bacteria. Close person-to-person contact in crowded or unsanitary living conditions can also contribute to transmission.