@ireneista @nyhan Yeah and there can also be random programs that start up in the background (without associated windows) and consume resources, which can build up over time and act as a drain on the system's resources - including, but not limited to, battery power. It's probably not a big deal unless you go for a truly long time without restarting (like, I dunno, a few months for Windows, probably longer for Mac 🤷), but it does mean restarting every so often is a good habit to get into. (And that's a true restart, not "fast shutdown" or whatever they have these days, idk) But I wouldn't expect this to have a significant effect on the health of the battery.
From what I've heard, the main thing to do to maintain battery health is to cycle the battery regularly: every so often, let it run down to low power (like 15%), then charge it back up to like 85%. Supposedly it helps the battery last longer than if you always have it fully charged or always at roughly the same charge level. But I don't know the details, or if it applies to all modern batteries or so on.