Upper endoscopy is recommended for individuals experiencing symptoms such as persistent heartburn, difficulty swallowing, unexplained weight loss, or gastrointestinal bleeding. It is also used for those at high risk of upper GI cancers, such as individuals with a family history of these cancers or certain genetic predispositions. Regular surveillance through endoscopy may be advised for patients with conditions like Barrett's esophagus, which increases the risk of esophageal cancer.