This study evaluates whether the time of day when immunotherapy is given affects clinical outcomes. It includes patients eligible for PD-1 (programmed cell death protein 1) or PD-L1 (programmed death-ligand 1) inhibitor treatment who have either advanced or metastatic non-small cell lung cancer (NSCLC) or locally advanced, resectable head and neck squamous cell carcinoma (HNSCC).The study tests the hypothesis that outcomes differ based on infusion timing (morning versus afternoon). Patients are divided into two cohorts by disease type: Cohort 1 includes NSCLC and Cohort 2 includes HNSCC. Within each cohort, patients are randomly assigned to receive infusions in the morning or afternoon, using a 2:1 ratio for NSCLC and a 1:1 ratio for HNSCC. All treatment and disease assessments follow standard medical care, and outcomes such as survival and treatment response are collected from medical records. Patients will be followed for up to 2 years.