If a battery is old or damaged, you may find that it requires more electricity than normal to charge, and it cannot get that electricity when the laptop is on because a portion of the electrical current is being used to run the machine’s various operations.
If your laptop only charges when closed, you have to assume that one of the following is to blame: 1). Reasons Why My Laptop Only Charges When Closed But what do you do when you realize that your laptop will only charge the battery after you shut it down? Is that normal behavior? No, it is not, and you should take immediate steps to fix the issue before it causes a bigger problem.
Most people have encountered situations where their laptops simply refuse to charge.