In this study, pan-cancer analysis highlighted the crucial role of ERBB2 in the immune microenvironment and metabolic remodelling. This evidence concerns the gene ERBB2 and cancer.