For lithium-ion batteries:
"... 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/00255462