The main finding of this study is that smoking history, hypertension, and opioids were associated with thyroid-related adverse events in patients taking anti-PD-1 or PD-L1. This evidence concerns the gene CD274 and thyroid gland disorder.