Most likely that is the "ding" sound associated with connecting the charger. If the cable is loose in the port, or if the USB-C port has a hardware issue (or even other hardware issue with the laptop or charger/cable), then the laptop may be seeing the charger being connected over & over. I haven't used a Magsafe cable on the M2 laptops yet, so I'm not sure if they will "ding" with it or not like it does with a USB-C charging cable.
Here are a couple of Apple articles for charging issues (one for Magsafe & another for USB-C):
If your MagSafe cable or power adapter isn't working - Apple Support
If your USB-C power adapter isn't charging your Mac laptop - Apple Support
This will most likely require you to have Apple or an Apple Authorized Service Provider examine the laptop to confirm. Take along your power adapter and charging cable so they can be tested as well in case the problem is with that instead of the laptop.