Don’t be panic. Just go to an Autozone shop and check what the code(s) is (are).
I guess there is nothing wrong with VSC & TRAC if there was no check engine light on before. Whenever an O2 sensor triggered the check engine light, the VSC & TRAC lights were on too for your car. When you replaced the O2 sensor and cancel the codes, the VSC & TRAC lights will be off with Os sensor code.
Another likely possibility is there is really nothing wrong with your car since there was no codes before replacing the battery. The reason for the lights on is the VSC ECU lost the calibration data when the battery was disconnected. Your car needs a zero-point calibration. I am afraid you have to bring your car to a dealer, Lexus or Toyota for it. It is a simple procedure. I don’t think non-dealer shops have the right tools to perform this service. The dealer may charge 0.5-1.0 hour labor. It is only a small amount of money for a Lexus repair service.