What is better, always keep connected or discharge/charge cycles for the smartphone battery?
The best solution would be to charge the battery to around 50% or a little more, and take it out of the phone for storage in a cool place. If the phone supports running without a battery in it.

The next best I guess would be to try to keep its state of charge in some range of ⅓ to ⅔, using slow charge.