Sorry can someone explains what to do with battery?
From one side you cannot work plugged in all the time.
But you cannot do the opposite too (never work with the mac plugged in unless you are recharging the battery): given that the battery life is 1000 cycles this is the quickest way to usure your battery.
I usually works with the notebook plugged in. However sometimes I disconnect it and let the battery goes down to say 10% and then I recharge it.
This is what apple suggest:
For proper maintenance of a lithium-based battery, its important to keep the electrons in it moving occasionally. Apple does not recommend leaving your portable plugged in all the time. An ideal use would be a commuter who uses her notebook on the train, then plugs it in at the office to charge. This keeps the battery juices flowing. If on the other hand, you use a desktop computer at work, and save a notebook for infrequent travel, Apple recommends charging and discharging its battery at least once per month.
I found this post from GGJstudios to be really helpful when trying to know what to do with the battery: https://forums.macrumors.com/posts/9875442/