Cancer can weaken the immune system in several ways. Tumors can produce substances that suppress immune responses, and cancer treatments like chemotherapy and radiation can damage immune cells. Additionally, cancer can spread to the bone marrow, impairing the production of new immune cells.