There are several strategies used for battery maintenance. Many prefer to use the 80 / 20 rule and store at 40 - 60%. These measures do indeed prolong battery life. Unfortunately, it also has an effect on range. For casual short distance riding, this isn't a problem. For longer rides, losing 20% of your battery capacity can become an issue.
I usually do 50 or more miles on an average ride. I prefer to store my battery at 40-60% and charge to 100% just before heading out. I rarely discharge below 20% but rather than walk the last few miles back, I have gone as low as 10% on a couple of occasions.
My battery is 3.5 years old and a recent bench test shows it has lost 9% of it's original capacity. Just how much of that loss is from age rather than use is unknown. At that rate, I can expect it to give me another 4 years of usable life. By then, new lighter, higher capacity batteries will likely be available and I'll want to replace it anyway. It is also likely I will want a new bike by then as well. Conventional bikes can last for decades but e-bikes are far more complicated and have a considerably shorter lifespan. I see no sense in babying a battery to the point it outlasts the useful life of the bike.
Your personal charging strategy will depend a great deal on how you plan to use your bike and where you ride it.
Much has been posted here on EBR about battery care. By all means, do some searching and read on! In particular, check out the posts from our resident battery expert
@Ravi Kempaiah.
Welcome to the forum and good luck with your bike!