Only check the charging & battery status while logged into macOS because the information shown on the lock screen can be incorrect many times.
If the laptop shows it is charging while the power adapter is disconnected, then perhaps you have another connected device which is providing power to the laptop. Disconnect all other external devices to see what happens.
If you are using the MagSafe 3 charging cable, then try using a USB-C charging cable instead. On of my organization's M-series laptops would not charge with MagSafe3 due to a bad Logic Board, plus I've seen a few other posts on this forum recently where others have mentioned this problem where the MagSafe 3 LED is blinking amber.
Have you tried restarting the laptop? Sometimes a simple restart can fix odd issues.
Try unplugging the power adapter from the electrical outlet for a minute to reset the power adapter's internal circuitry. Here is an Apple article for troubleshooting charging issues:
If your MagSafe cable or power adapter isn't working - Apple Support
Have you right-clicked or Control-clicked on the battery icon to check the battery condition & whether charging is on hold due to Optimized Charging? If so, then there should be an option to resume charging.
If battery charging is paused or on hold on your Mac - Apple Support
You can also try running the Apple Diagnostics to see if any hardware issues are detected.