To prevent the spread of stomach bugs, practice proper handwashing, clean and disinfect surfaces regularly, and avoid close contact with infected individuals.