Battery charge limiter for Apple Silicon MacBook devices
github.com
github.com
The option may also have been in earlier versions, I don't recall.
Additionally, Optimized Charging uses machine learning to decide when the battery should be held at 80%, and when it should become fully charged.