While it's not always possible to prevent gastric cancer, certain lifestyle changes can reduce the risk. These include maintaining a healthy diet rich in fruits and vegetables, reducing salt and smoked food intake, quitting smoking, and treating Helicobacter pylori infections promptly. Regular screenings and monitoring are recommended for those with a family history of gastric cancer or other risk factors.