Is it an intel Mac? You might want to reset the SMC
For a Mac laptop without the Apple T2 Security chip:
- Shut down your Mac.
- On your built-in keyboard, press and hold all of these keys:
- Shift on the left side of your keyboard
- Control on the left side of your keyboard
- Option (Alt) on the left side of your keyboard
- While holding all three keys, press and hold the power button as well.
- Keep holding all four keys for 10 seconds.
- Release all keys, then press the power button to turn on your Mac.
If you need help, contact Apple Support.
For a MacBook with the T2 security chip (see this link to check if you've got a Macbook with the T2 chip Mac computers with the Apple T2 Security Chip - Apple Support)
Before resetting the SMC, follow these steps:
- Shut down your Mac, if possible.
- Press and hold the power button for 10 seconds, then release the button.
- Every Mac has a power button. On laptop computers that have Touch ID, press and hold Touch ID.
- Wait a few seconds, then press the power button to turn on your Mac.
If the issue persists, reset the SMC:
- Shut down your Mac.
- On your built-in keyboard, press and hold all of the following keys. Your Mac might turn on.
- Control on the left side of your keyboard
- Option (Alt) on the left side of your keyboard
- Shift on the right side of your keyboard
- Keep holding all three keys for 7 seconds, then press and hold the power button as well. If your Mac is on, it will turn off as you hold the keys.
- Keep holding all four keys for another 7 seconds, then release them.
- Wait a few seconds, then press the power button to turn on your Mac.
If you need help, contact Apple Support.
If this is not working, you might want to follow these steps:
- Check the battery condition: Your Mac laptop may not be charging because of an issue with the battery. All rechargeable batteries become less effective as they age. See Check the condition of your Mac laptop’s battery.
- Inspect the hardware: Make sure everything is plugged in and undamaged. Check the port, the charging cable, the power adapter and the AC wall adapter. If anything is damaged, stop using it.
- Let it cool down: Move your Mac to a cool, well-ventilated spot. Mac laptops work best at 10° to 35° C (50° to 95° F) ambient temperatures. If you use your Mac in a poorly ventilated space like under a blanket or on thick carpeting, the adapter might turn off to prevent overheating. If the recommended battery temperatures are exceeded, charging may stop at 80%.
- Clean the port: Make sure the port is clean and free of debris. Disconnect it from the power adapter and clean it with a soft, dry, lint-free cloth.
- Use a different cable: You can find out if the cable is causing the issue by trying another cable. Not all cables can charge, so make sure the cable you’re using is designed for charging. For best results, use the cable that comes with your Mac. See the Apple Support article Identify your Mac power adapter.
- Use a different power adapter: Your computer may be connected to a power source that gives it enough power to run, but not enough power to charge the battery. For example, your Mac might not charge when it’s connected to a low-wattage adapter. For best results, use the power adapter that comes with your Mac. See the Apple Support article Identify your Mac power adapter.
- Use a different AC wall adapter: Your power adapter comes with a removable AC wall adapter that has the blades you insert into an electrical outlet. If your Mac doesn’t charge when using the AC wall adapter with the power adapter, try it with another Apple AC wall adapter or try using an Apple Power Adapter Extension Cable.
- Use a different power outlet: Make sure that you’ve connected your power adapter to a working power outlet. Unplug your power adapter from the power outlet, then plug in a device that you know works, such as a lamp, to confirm that the power outlet works.
- Check for line noise: Unplug the power adapter from the wall, wait 60 seconds, then plug the adapter back in. If the adapter works after this interval, there is most likely a line noise issue with the power source. Reset the adapter periodically by repeating this process. Some possible sources of line noise include lights with ballasts, refrigerators or mini-refrigerators that are on the same electrical circuit as your computer.
- Leave it plugged in for a while: If you recently removed your computer from long-term storage, it may be in a low-battery state. It may require 20 minutes of charging with its power adapter before you can use it again.
- Run diagnostics: You can use Apple Diagnostics to help determine which hardware component might be at fault. Apple Diagnostics also suggests solutions and helps you contact Apple Support for assistance. See the Apple Support article Use Apple Diagnostics to test your Mac.
See this link for further reference
If your Mac battery won’t charge – Apple Support (UK)