Batteries are designed to last the typical lifespan of whatever product they are fitted to. So while a mobile phone or laptop battery might show signs of degradation after a couple of years, an electric vehicle battery should have retained most of its capacity over a ten-year lifespan.
This is reflected in vehicle warranties which are typically longer than you’d get with a petrol or diesel engine. For example, Tesla offers an eight-year warranty on all of its battery packs, guaranteeing it will have retained at least 70% of its battery capacity over that timescale.