Your charging cable could be loose, unplugged, or damaged. Your charging cable could have a weak connection because it wasn't made by your laptop's manufacturer. Your charging ports could be clogged with dirt or debris that is keeping it from powering up properly.