You plug in your adapter to your laptop, and the battery doesn’t charge reliably. Sometimes, your Mac dings to let you know it’s plugged in to power; other times, you have to plug and unplug, or even restart your computer. What’s up?
Battery charging involves three separate elements, so you have to go through a process of troubleshooting to identify which one is faulty.
For several releases of macOS, Apple has provided alerts and information about the health and status of a laptop’s battery. macOS warns you if something’s actively wrong with a battery when it determines this.
In macOS Catalina and earlier, you can Option-click the battery icon in the menu bar, and get a little more insight about the state of the battery. In macOS Big Sur, there’s a lot more detail about the battery available by default, but the condition is nested more deeply: go to the Battery preference pane, click Battery, and click Battery Health.