Apple will want to evaluate the power adapter and cable as well as the Mac before sending you a new one, because there can be a number of reasons it's not working. Start with Get Support.
When you do that, they will want you to review all the suggestions in the following Apple Support documents to make sure there isn't anything they can do before inconveniencing you with the need to go somewhere:
If your Mac battery status is “Not Charging” - Apple Support
If your Mac battery won’t charge - Apple Support
Confirm the power adapter and cable you are using are correct for your model Mac: Identify your Mac power adapter - Apple Support. For example, you can't use just any USB-C cable. It has to be the correct one, otherwise your Mac just won't charge.