Preventive measures for pneumonitis focus on careful planning and monitoring during cancer treatment. For instance, radiation therapy plans can be tailored to minimize lung exposure, and patients on immunotherapy or chemotherapy can be closely monitored for early signs of lung toxicity. Prophylactic use of corticosteroids or other medications may also be considered in high-risk patients.