I've had my e-bike for a few years now, and yeah, the battery can definitely degrade faster with irregular use. Lithium batteries don't like long periods of inactivity, especially if you stored it somewhere cold or, on the flip side, somewhere hot. Even half a year of just sitting there is already stress on the battery. Plus, if the e-bike was sitting fully drained or, conversely, constantly plugged in charging, that speeds up wear. Losing 25-30% capacity over that period is most likely the result of improper storage rather than an actual failure.
Try doing a few full charge-discharge cycles first (fully drain it, then charge it to 100%). Sometimes that helps the battery "remember" itself. If that doesn't work - check whether the controller and motor are working properly (they might be drawing more power than they should), and only then think about replacing the battery.
For the future, remember this: lithium batteries are best stored at room temperature and at around 50% charge. If your e-bike's going to sit unused for a while, give it a top-up charge periodically. That'll really extend the battery's lifespan.