Hello MacintoshBook_User,
Thank you for reaching out to Apple Support Communities.
If your Mac battery won’t charge
If the battery in your Mac notebook computer won’t charge, try one or more of these solutions:
Reset the SMC: Reset the System Management Controller (SMC), which controls how your Mac manages power. If you have a Mac with Apple silicon, just restart your computer. For other Mac computers, see the Apple Support article How to reset the SMC of your Mac.
Get your Mac serviced: If the battery still won’t charge, your Mac may need to be serviced. Take your Mac to your local Apple Store or contact AppleCare. See Find how to service or repair your Mac.
More details can be found here: If your Mac battery won’t charge
If the issue persists, can you provide a few more details? Have you tested with any other cables or power adapters?
Good Luck!