Erectile dysfunction is a common adverse effect of external beam radiation therapy for localized prostate cancer (PCa), likely as a result of damage to neural and vascular tissue. Magnetic resonance-guided online adaptive radiotherapy (MRgRT) enables high-resolution MR imaging and paves the way for neurovascular-sparing approaches, potentially lowering erectile dysfunction after radiotherapy for PCa.