It really helps to know the exact model of the computer since there are huge differences between Intel models and Apple Silicon Macs.
Are you using the Magsafe cable or the USB-C charging cable. If the Magsafe cable, is the Magsafe LED lit? If so, is it amber, green, red, or flickering?
If you are using the Magsafe cable, have you tried using a USB-C charging cable?
If you are using a USB-C charging cable, then try connecting it to another USB-C port, especially on the other side of the laptop. Even try another charging cable.
Make sure to connect the USB-C charging cable (if you are using this type) directly into the laptop since adapters, docks, and hubs may not allow the full power of the charger to reach the laptop.
Even make sure to disconnect all external devices in case one of them is causing a problem.
Try unplugging the power adapter from the electrical outlet for a minute to reset the charger's internal circuitry.
Make sure you are using the correct size charger for your laptop, which I believe for the 16" M2 model would be the 140W charger. If you have the Intel model, the you need the 96W charger.
Here are two Apple articles for troubleshooting charging issues depending on the type of laptop & charger you have:
If your USB-C power adapter isn't charging your Mac laptop - Apple Support
If your MagSafe cable or power adapter isn't working - Apple Support
Fred Davenport wrote:
No, My home office has only one outlet. My home office has been working perfectly until I "changed" to an Apple USB-C cord
You do have other electrical outlets in your home? It is after all just for testing. At the very least make sure to plug the power adapter directly into the wall outlet just in case a power/surge strip has a problem.
Edit: Added troubleshooting link for Magsafe charging.