It sounds like you’re trying to diagnose this yourself via a low-tech route, and that just doesn’t work anymore. There are different monitors within car’s computer for various systems, and they take different amounts of time to run. For instance, the monitor for your catalytic converter requires the car to be driven at a certain speed for a certain amount of time, before it will run - only after a monitor has run can the CEL for that monitor be illuminated.
I’m willing to bet this is something catalyst related. You say you got an O2 sensor code - which code is it? There are dozens of O2 sensor codes. Please also don’t assume this means the O2 sensor is bad - there are many things besides a bad sensor that could cause this to set.
Please find a competent mechanic to diagnose your issue. Look for an independent mechanic or the dealer, not the chain store down the street.