2018 Ford Fusion SE FWD 4D SED 4-2.0L Hybrid,

Check engine light came on and code reader said it was for the oxygen sensor. By the time the part came in the check engine light went away on its own. Should I still change the sensor or should I not worry about it? TIA.