Our findings reveal that the biological processes associated with β2M levels, DLBCL, and HL are closely linked to the innate immune system, highlighting the significance of the tumor immune microenvironment (TIME). Here, B2M is linked to neoplasm.