Oil light comes on when I come to a stop

It’s probably a bad oil pressure sending unit. Before you replace it make sure the wire is still attached and not broken/damaged.