Long-term use of proton pump inhibitor (PPI) acid-suppressing agents, such as omeprazole, has been associated with an increased risk of stomach cancer (also called gastric cancer). This is based on the results of several observational studies and is thought to be because PPIs such as omeprazole are potent gastric acid suppressants that may increase the risk of gastric cancer by causing atrophy (thinning) of the stomach lining, elevating levels of a hormone called gastrin, and an overgrowth of bacteria in the stomach.
Studies conducted in 2017 and 2018 concluded that long-term use of PPIs more than doubled the risk of gastric cancer, although some other studies have contradicted these findings. A 2019 study found that even when the bacteria, helicobacter pylori, was eradicated, long-term PPIs were still associated with a two-fold increased risk for gastric cancer. However randomized clinical trials are lacking, and more trials are needed.
Short-term use of omeprazole is likely very safe, but you should talk to your doctor if you have been taking omeprazole long term or have been prescribed it long term.