This is most likely the o2 sensor, an easy fix that you can do yourself. Depending on the make of the vehicle, it’s on the exhaust pipe just before the catalytic converter, replace it. Or it is the intake fuel sensor between the air filter and the intake usually on top of the intake hose, a wire harness plugged into it. Replace it or clean it with a degreaser, easy fix.