More than a few Apple articles suggest to not allow the portable's battery
to run flat or dead since that can damage their ability to carry a full charge
and reduce the run-time in the future, after such events.
Also, temperatures and other environmental conditions in the location of
use, can affect the battery life; and the computer settings can help reduce
the load on the battery when there is no ability to recharge it.
• About Mac notebook batteries - Apple Support
• Apps can affect Mac performance, battery runtime, temperature, and fan activity - Apple Support
•Maximizing Performance - Apple - Batteries:
https://www.apple.com/batteries/maximizing-performance/
• Apple Portables: Troubleshooting MagSafe adapters - Apple Support
Review the following articles for more information on using diagnostics.
In any event, there are details about the configuration that would bear
looking into and the battery app suggested may be helpful in addition
to the other information and suggestions from Apple support articles.
Good luck & happy computing! 🙂