The prognostic and immunotherapeutic roles of Piezo2 in pan-cancer have not been reported. Here, PIEZO2 is linked to cancer.