Here is some of Apple's guidance regarding battery health and management:
Batteries - Maximizing Performance - Apple Support
About battery health management in Mac laptops - Apple Support
In a nutshell, to get the most from your battery:
• Let the OS and charging circuits manage the charging.
• Plug in when using the computer near available power.
• Use on battery when ac is unavailable or when you must be mobile.
• Don’t subject the computer and battery to extreme temperatures.
• Don’t allow the battery to regularly discharge deeply before plugging in. Yes, it may happen from time to time, just don't make it a habit.
• Don’t obsess over battery life and/or health.
❝Worry is the misuse of imagination.❞ – Zadra