While not all cases of gastric cancer can be prevented, certain lifestyle modifications can reduce the risk. These include maintaining a healthy diet rich in fruits and vegetables, reducing the intake of smoked and salted foods, quitting smoking, and managing underlying conditions like H. pylori infections and chronic gastritis. Regular medical check-ups and screenings for those at high risk can also aid in early detection.