I went and got a emissions test and I failed

becasue the check engine light came on and the error code read P0141 Bank1 Sensor2. So I went to the auto store and bought a a downstream O2 Sensor and had a mechanic install it and turn the light off and a
hour later it came back on can anyone please help!