In addition to @John Galt's advice:
Make sure the charger is connected directly to the laptop since multiport adapters or hubs/docks may not allow the full power of the charger to reach the laptop.
Also try using another USB-C port especially on the other side of the laptop.
Try rotating the connector of the charging cable 180 degrees upside down in case the USB-C port is half bad. If this works, then you will need to have the laptop repaired.
I have personally experienced several of our organization's16" 2019 laptops with this issue, but I don't recall if it occurred while the charger was directly connected to the laptop.
Try disconnecting all external devices (especially ones without their own power supplies) in case they are drawing too much power from the laptop.
Carefully inspect each USB-C port to see if the contacts are dirty or damaged (both top & bottom). It is extremely difficult to clearly see the contacts. The majority of USB-C Apple laptops I repair tend to have at least one USB-C port that usually has some corrosion from liquid damage. I have gotten pretty good at examining these USB-C ports, but sometimes I still miss corrosion damage when I tear the laptop apart and examine the I/O Boards after removing them from the laptop.
Run the Apple Diagnostics to see if any hardware issues are detected.
If none of our suggestions helps and Apple is unable to detect a hardware problem, then I would suggest purchasing Apple's 140W charger for the latest M1 Macs in case the 96W charger is just borderline for a fully loaded laptop (it is showing a 2 - 3 month backorder in the US). FYI, the charger is physically bigger.