What an oxygen sensor actually does
Put the car on a lift and look at the exhaust, just ahead of the catalyst. A hex bung in the pipe. A probe screwed into the stream. A harness clipped back toward the computer. That is the oxygen sensor — O2, lambda, same part. It is the only thing in the pipe that tells the computer what the last fire actually burned.

The question is simple: how does the engine know if the mix was rich or lean? The sensor sits in the gas and reads leftover oxygen. Not fuel. Not soot. Oxygen. A zirconia thimble, or a wideband cell on newer cars, makes a voltage or a current that tracks how much air is left after the bang. Lambda is just that reading against stoich. The computer is chasing 1.00, not a smell from the tailpipe.

That number is the closed-loop leash. Too much leftover oxygen and the mix was lean, so the computer adds fuel. Too little and it was rich, so it pulls fuel. A cold start runs open loop on a stored map until the probe is hot enough to trust. After that, the loop is the leash.
Upstream of the brick is the mix. Downstream is the babysitter — it watches whether the catalyst is still eating the leftovers. Two sensors, two jobs. Both live in the exhaust. Neither one sprays fuel.
If the probe goes slow or sooty, the computer guesses. Idle hunts. Fuel trims walk. A heater inside the sensor has to get it hot before it can read; a dead heater is its own code. The downstream sensor never sees the brick work, so the catalyst light comes on even when the brick is fine.

Pull it and look at the tip. A new shroud is bright metal with holes. A dead one is black. That is the whole tell from the bay.