In this cohort study, we showed that a history of PPI use was associated with a shorter PFS in patients with advanced NSCLC with a high PD-L1 TPS receiving pembrolizumab monotherapy but not in those receiving ICI plus chemotherapy. Here, CD274 is linked to non-small cell lung carcinoma.