Battery charger/maintainers are your friend.
I’ve had one of these for years and brought back batteries I thought were gone, gone, gone.
I understand, but..... If you lack the gumption and forethought to connect it, it does no good.