Engine light wont go off until obd resets

Recently engine light showed up on my chevy spark and its not go off, the mechanic used the obd tool and dicided its the oxygen sensor. After replaceing the o2 sensor the light turned off but few hours later when i turned the engine on the light back again. Went back the the mechanic he suggested to replace brake light switch and reset the flags with the obd tool, few hours later the light is back.
I noticed that the light come back when i start the engine or a minute later after the engine is completly cold(winter outside). When i left the mechanic i stopped on the side way, swiched the car off for 10 minutes and started it again the light didnt show(two times day after day). Anyone have an idea what is it or how to check it up?
Thanks

Step 1: you need a better mechanic. one that will test things instead of just tossing random parts at it.
Step 2: post the actual ODB codes your car is showing. Post them in P0123 format, so we can see what they actually are. Then we can lead you in a direction of how to figure out what is happening.
Step 3: give us more details about your car: year? mileage? what engine? etc.

Ask the mechanic what the code is in the form Pxxxx, and report back and we can provide suggestions.

Spark LS 2014 1.0L
75000km
First it was a message about the o2 sensor bank 1… two mechanics sayed that. Later when nothing unnormal on the obd tool but some electronic brakes isuee… he suggested the replace brake switch.
I,ll post the codes tomorrow
Thanks all

The code is p0031
The mechanic removed the new sensor, put the old one back and return my money

The O2 sensor heater isn’t working.
Your mechanic needs to:
Check the relevant fuse.
If okay then use a multimeter to see that heater voltage and ground are reaching the sensor, and find the wiring fault or bad connection if not.

The mechanic should have checked these things, and a resistance check of the heater before replacing the sensor.