I imagine that most modern battery operated devices do something similar by default, unless they have a dedicated option to turn it on/off.
1 - whatever they say in the manual
2 - if you'll be needing to use the device for a long period of time without the ability to recharge it, then charge it up to 100%
3 - otherwise, topping it up to 80% when it reaches 20% is a reasonable thing to do
"... keep your battery life somewhere between 40 percent and 80 percent ..."
"Research shows that extremes wear out the lithium-ion batteries ..."
https://www.eeworldonline.com/why-you-should-stop-fully-charging-your-smartphone-now/
Sony's recommendations: "Charge your device just as much as needed. If you leave your device charging
for a long time after reaching 100%, the battery might be damaged."
"Avoid total discharges, as these can damage the battery and decrease the
capacity."
"Limit exposing your device to extremely hot (37°C or above/direct sunlight)
or cold environments (temperatures below 0°C)."
"If you plan to store your device for an extended period, charge it between
20 - 80% and then turn it off (Tip: this applies to any device with a
rechargeable battery)."
https://www.sony.co.uk/electronics/support/mobile-phones-tablets-mobile-phones/xperia-1-ii/articles/00232835
https://www.sony.com/electronics/support/articles/00255462Typically avoiding the (dis)charge extremes is good. For Li-ion though a much wider range seems OK than (say) lead-acid.
This may help (I'm a paid user): https://apphousekitchen.com/feature-explanation-charge-limit...
Electronics are consumable devices. When batteries degrade, you should replace the battery to give your device a couple extra years of life. I believe this is possible with most devices, especially phones and laptops.