Preferably, shut it down and then charge it when your laptop's battery ends. It will charge faster when the system is not doing any work. But if you keep on performing your tasks and plug them in simultaneously, this will cause your battery to charge slowly and increase stress on it. Every time you charge the battery, its life span reduces a little bit that would go unnoticed by you. However, the Lenovo ThinkPad X1 Carbon Gen 9 (2021) is a well-rounded item that does well even if you treat it harshly.