By far the easiest way to cause poor performance, instability, overheating and crashing is to install ANY third-party speeder-uppers, Cleaners, Optimizers, Virus scanners, Bit Torrent, or a VPN that you installed yourself. They are relentless in scanning your files, non-stop, looking for virus-like patterns in Everything, or looking for files that have changed. When completed, they do it all again.
The idea that a third party, with no special knowledge of the inner workings of MacOS, can somehow find a simple way to protect or speed up your computer — that is not already being done by MacOS itself — suggests that the MacOS developers are somehow "holding out on you". That is absurd.
You should remove any and all (other than Apple built-in) virus scanners, speeder uppers, optimizers, cleaners, App deleters or VPN packages you installed yourself, or anything of that ilk.
Your exceptionally well-crafted Macintosh computer does not accumulate filth that needs any third-party anything to clean it. Everything needed to run it efficiently was included in the box, except ONE: a drive on which to store a second copy of your files in case the first copy is damaged or deleted by accident. The backup software, Time Machine, is already present -- integrated deeply into MacOS.
--------
That computer is a battery-CAPABLE device, It is not optimized as a battery-operated device (it is not an iPhone.)
Your computer performs best when connected to AC power, such as the power adapter. It can use the full output of the Power Adapter AND when doing especially challenging work could also freely "borrow" power from the battery. In some cases, even with the power adapter connected, the charged state may decline during very stressful work.
When used only on battery, your computer has no extra cushion of power, and may perform more slowly. However, for ordinary non-stressful tasks this may not be objectionable (possibly not even noticeable.)
In general, you should ALWAYS connect a power source when it is possible to do so, and only run on batteries (which could be somewhat slower) when no power sources are at hand. Modern Macs maintain optimum battery charge levels under program control, and will NEVER over-charge. Connected to Power is NOT necessarily charging.
When you set it down in one place, or set it down for the night, Plug it in. Then you won’t CARE whether it would drain the battery.