An example of advice;
Android phone manufacturers, including Samsung, say the same. “Do not leave your phone connected to the charger for long periods of time or overnight." Huawei says, “Keeping your battery level as close to the middle (30% to 70%) as possible can effectively prolong the battery life.”
Samsung
Most Smartphones have a lithium-ion battery that lives longer when charged regularly. Unlike the nickel batteries used in older phones, lithium-ion batteries do best when kept above a 50 percent charge. Repeatedly allowing the battery to drain fully may shorten its life and decrease its overall capacity.
Leaving the phone connected to the charger (when the phone is completely charged) while you are using it may lower battery life if you do it repeatedly.