Cancer can directly impact the immune system by affecting the production and function of immune cells. For example, cancers like leukemia and lymphoma originate in the bone marrow or lymphatic system, which are crucial for immune function. Additionally, tumors can create an immunosuppressive environment that inhibits the body’s ability to mount an effective immune response.