Leroy has given you excellent links to Apple recommendation. The battery has technology that prevents it from overcharging.
Ignore some third-party sites that tell you to "calibrate" you battery. Apple ceased recommending that about ten years ago. Also avoid routinely running the battery to zero. Once or twice won't hurt it but don't make it a habit.
Apple once recommend using the computer on battery about once a week to keep it healthy, but that was before they "dumbed-down" most of their support articles. Therefore no one here (we are end users like you) knows whether Apple no longer recommends this, or it was simply considered "too much info" and was deleted as part of the support document overhaul.
Me? I run my 2012 MBP once a week on battery because that fits my workflow. One day a week I work away from home and there is a shortage of power outlets at the remote site. After six years of use the original battery still retains over 90 percent of its original capacity. Those ~3-hour sessions on battery use about 40 percent of the charge so it still delivers good runtime.
My impression from participating here many years is that batteries that last the longest are the ones that see some regular use.
Best practice: don't obsess over your battery.