check engine light O2 sensor already replaced same codes still popping up after replacing old O2 sensor

I went to AutoZone after seeing a check engine light on and got a diagnostics check on my check engine light it said I have a faulty O2 sensor bank 1 sensor 2 to replace so I replaced it got my codes cleared even reset the codes by disconnecting the battery and drove over a hundred and fifty miles already I still have the check engine light on I went to AutoZone and got another diagnostic check and the same code is popping up still saying I need a new O2 sensor that bank 1 sensor 2 is faulty what should I do what else could be the problem if I have a brand new fitted O2 sensor in there already

– check engine light O2 sensor already replaced same codes still popping up after replacing old O2 sensor