While some factors like genetics are beyond control, adopting a healthy lifestyle, avoiding NSAIDs unless prescribed, and following medical advice can reduce the risk of peptic ulcers.