I have heard that it is possible to extend battery life of a laptop if leave it as much as possible plugged in. However, it was the case for apple macbooks and I have Acer Swift. Is this information relevant?
In a nutshell, you ideally want to keep battery between 20% and 80% charged. IF the BIOS supports customisable settings, configuring this and leaving the laptop plugged in is the way to go.
If the BIOS does not support this feature, between leaving it plugged in and letting it run down fully - leaving it plugged in is most likely the lesser of 2 evils - but if you can unplug it and trigger a plug in warning you will be able to action at 20% that is probably better. (I note that Acer Swift is a line of laptops, not a single model)
Note that 0% and 100% may not mean this - some devices define these as being higher and lower compared to absolute values to provide longer lasting batteries at expense of runtime.
Is there an Acer battery management tool that limits the battery charge? Should I even bother? crom 2014 is on point and highly relevant (but not the answer).