Inclusion Criteria:
Cohort 1:
* The participant must have a histologically or cytologically confirmed diagnosis of locally advanced unresectable or metastatic gastric or gastroesophageal junction (GEJ) adenocarcinoma, with locally confirmed programmed death-ligand 1 (PD-L1) CPS ≥1.
* Has locally confirmed human epidermal growth factor receptor 2 (HER2) negative cancer.
Cohort 2:
\- Has a histologically confirmed diagnosis of advanced (metastatic) and/or unresectable (locally advanced) biliary tract cancer (BTC) (intra or extrahepatic cholangiocarcinoma or gallbladder cancer).
Cohort 3:
* Has high-risk locally advanced cervical cancer.
* Has histologically confirmed squamous cell carcinoma, adenocarcinoma, or adenosquamous carcinoma of the cervix.
All Cohorts:
* If hepatitis B surface antigen (HBsAg)-positive, has undetectable hepatitis B virus (HBV) viral load and has received HBV antiviral therapy for at least 4 weeks and will continue it.
* If history of hepatitis C virus (HCV) infection, has undetectable HCV viral load.
Exclusion Criteria:
Cohort 1:
* Has squamous cell or undifferentiated gastric cancer.
* Has had previous therapy for locally advanced, unresectable or metastatic gastric/GEJ cancer.
* Has known active central nervous system (CNS) metastases and/or carcinomatous meningitis.
* Has had major surgery, open biopsy, or significant traumatic injury within 28 days prior to first dose of study.
* Had active hemoptysis (bright red blood of at least 0.5 teaspoon) within 3 weeks or tumor bleeding within 2 weeks prior to the first dose of study intervention.
Cohort 2:
* Has ampullary cancer.
* Has small cell cancer, neuroendocrine tumors, lymphoma, sarcoma, mixed tumor histology, and/or mucinous cystic neoplasms.
* Has had previous systemic therapy for advanced (metastatic) or unresectable (locally advanced) BTC (intra or extrahepatic cholangiocarcinoma or gallbladder cancer), with the exception of neoadjuvant/adjuvant therapy, which is allowed.
* Has known active CNS metastases and/or carcinomatous meningitis.
* Had active hemoptysis (bright red blood of at least 0.5 teaspoon) within 3 weeks or tumor bleeding within 2 weeks prior to the first dose of study intervention.
Cohort 3:
\- Has undergone a previous hysterectomy defined as removal of the entire uterus or will have a hysterectomy as part of their initial cervical cancer therapy.
All Cohorts:
* Has hypokalemia.
* Has hypomagnesemia.
* Has hypocalcemia.
* Received prior therapy with an anti-programmed cell death protein 1 (PD-1), anti-PD-L1, or anti-programmed death-ligand 2 (PD-L2) agent, or with an agent directed to another stimulatory or coinhibitory T-cell receptor.
* Has active autoimmune disease that has required systemic treatment in the past 2 years.
* Has history of (noninfectious) pneumonitis/interstitial lung disease that required steroids or current pneumonitis/interstitial lung disease.
* Has a known additional invasive malignancy that is progressing or has required active treatment within the past 3 years.
* Has history of human immunodeficiency virus (HIV) infection.
* Has known active tuberculosis.
* Has not adequately recovered from major surgery or is having ongoing surgical complications.