Like other medical impairments or conditions, Cancers have a listing in the SSA Blue Book. If your medical records establish that you meet this listing, and you are otherwise eligible (i.e. not earning more than SGA, etc.) you may be awarded your SSD. Those listings for Cancer are available online at Section 13.00 of the Blue Book.
Cancers can qualify as a Compassionate Allowance if the cancer has spread beyond the region of origin, it is inoperable, or it is recurrent despite treatment being had.
Often, one will have to seek to qualify via Residual Functional Capacity (RFC) because a Listing finding is not possible. RFC proofs can be difficult. If you don’t prevail via a listing, you’ll have to show that your cancer, required treatments, and the side effects or residual challenges you face are severe enough that they prevent you from working in ANY job.