Cancer, or cancer treatments, can cause damage to the lymphatic system. Cancer itself can get in the way of fluid draining out of the extremity. The treatments for cancer, particularly surgery and radiation, can damage lymphatic vessels and lymph nodes. While lymphatic vessels will grow again given time and a good healing environment, lymph nodes are not able to regrow.
Chemotherapy does not cause lymphedema, but can contribute to the swelling as it causes some water retention throughout the whole body. I would like to stress that while the treatments for cancer can cause lymphedema, those treatments were chosen to increase your chances of survival. Lymphedema is not a life-threatening disease, but cancer is. Those providing your cancer treatments have and/or will provide it in such a way to reduce your chance of getting lymphedema and still maximize your chance of survival.
Lymphedema can affect people soon after surgery and/or radiation, or 20 years down the road. With surgery, it is expected that people will have swelling as part of post-surgical healing. It is a good rule of thumb to wait until 3 months after surgery before deciding if swelling is truly lymphedema or is just post-surgical swelling. However, it is never too early to learn what you can do to prevent lymphedema.