Those are the usual symptoms of a battery that’s weak and/or discharged. The clicking is the starter solenoid unable to keep the starter engaged, due to the starter motor’s high demand for battery current.
Note that a discharged battery will suffer internal damage if it’s left in sub-freezing temperatures. If it’s got any hope at all, at this point, consider disconnecting it and letting it spend the night somewhere above 32 ^o F.
Check if there’s an auto parts store in your local area, that offers free battery testing/charging services.
Careful, don’t get caught in a wild goose chase: P0138 is Bank 1 (toward the firewall), Sensor 2 (Downstream sensor)
Anyway, do you mean there’s a bad exhaust smell, or something like an electrical fire smell?
If you have a basic OBD2 scan tool with a live-data feature, run the engine and check if your B1S2 voltages are higher than 1.2 volts for more than 10 seconds. If so, you’d proceed with an electric wiring/connector inspection & diagnosis.
If the voltage response isn’t stuck above 1.0 volts, start the diagnosis by assuming a bad sensor (Bank 1 Sensor 2).