Inclusion criteria:
- Participant must have histologically or cytologically confirmed metastatic NSCLC characterized by a KRAS G12C mutation at the time of enrollment. For Phase 1: Participant must have progressed on or after, or have intolerance to, platinum-based chemotherapy and Programmed Death-Ligand 1 (PD-L1)-targeted immunotherapy given in combination or sequentially. Receipt of additional lines of prior therapy is permitted. Progression must have occurred on or after the most recent line of systemic anticancer therapy. For Phase 2: Participant must have progressed on or after platinum-based chemotherapy and PD-L1-targeted immunotherapy given in combination or sequentially. Progression must have occurred on or after the most recent line of systemic anticancer therapy. Receipt of additional lines of prior therapy is not permitted
- Participant must have at least 1 measurable lesion, according to RECIST version.1.1, that has not been previously irradiated
- May have brain metastases only if previously definitively, locally treated, and participant is clinically stable and asymptomatic for greater than (>) 2 weeks and is off or receiving low-dose corticosteroid treatment for at least 2 weeks prior to start of study treatment
- Can have a prior or concurrent second malignancy (other than the disease under study) with natural history or treatment course that is unlikely to interfere with any study endpoints of safety or the efficacy of the study treatment(s)
- Have an Eastern Cooperative Oncology Group (ECOG) performance status of 0 or 1
Exclusion criteria:
- Participant has history of uncontrolled illness
- Suspected or known allergies, hypersensitivity, or intolerance to amivantamab excipients or olomorasib excipients
- Medical history of (non-infectious) interstitial lung disease (ILD)/pneumonitis, or has current ILD/pneumonitis, or where suspected ILD/pneumonitis cannot be ruled out by imaging at screening
- Presence of primary driver mutations (epidermal growth factor receptor [EGFR], anaplastic lymphoma kinase [ALK], mesenchymal-epithelial transition [MET], human epidermal growth factor receptor 2 [HER2], ROS1, neurotrophic tyrosine receptor kinase [NTRK], B-Raf proto-oncogene [BRAF], rearranged during Transfection [RET], neuroblastoma RAS viral oncogene homolog [NRAS], and other KRAS mutations besides G12C) as determined by local genomic testing
- Prior treatment with any KRAS inhibitor