They self discharge and become inert, unless
Someone plugs them in. They won’t likely just catch fire, but there will be (is) a lot of dangerous to use junk out there.
I just decommissioned about a dozen Li-po batteries from old drone projects. This involves making them truly inert. There was a LOT (>50%) of energy in those batteries after 4 years.
There's an art collective around here that had a massive fire that started from a cell phone that had been held in a lost and found bucket for some years. Apparently it just caught fire one day.
I've become pretty conservative with old phones, laptops, and the like. If I'm not going to use them/have them repaired I put them somewhere safe and recycle them.
There are likely billions of abandoned devices with lithium batteries sitting the in the back of drawers all over the country, and fires from them randomly bursting into flames seems pretty rare.
But even if 1000 of these things burst into flames a day, that is still 0.04% chance of any given device burning up in a year.
If you are concerned about them, discharge the batteries completely. If you leave the battery discharged, it (very likely) won't start a fire. But it will also continue to self-discharge, which will ruin the battery over time. In which case, the device is likely junk anyway, so you might as well just take them in to be recycled now rather than later.
The biggest danger is trying to recharge them after they have been stored for a long time. The anode and cathode might short-circuit and then a fire will likely start. If you want to check out an old gadget or battery make sure to watch it while charging and have a fire safe container or a plan to extinguish the fire at hand.