The procedure involves inserting the endoscope through a small incision or natural orifice, such as the mouth or anus, to reach the tumor site. Specialized surgical instruments are then threaded through the endoscope to remove or biopsy the tumor. Advanced techniques, such as robotic-assisted surgery, can enhance precision and control during the procedure.