Overexposure to ultraviolet (UV) rays from the sun or tanning beds is a major risk factor for skin cancer. Using sunscreen with an SPF of 30 or higher, wearing protective clothing, and avoiding peak sun hours can help minimize this risk. Regular skin examinations are also important for early detection of abnormal changes.