In conclusion, our study revealed that CDKN2A and NEDD4 were associated with immune cell infiltration and elucidated significant immune heterogeneity among patients with cuproptosis-related molecular clusters of IPF. Here, CDKN2A is linked to idiopathic pulmonary fibrosis.