Has this specific external drive (assuming an SSD?) ever worked on this M1 laptop with any version of macOS 13.x? Not all external devices are compatible with an Apple Silicon Mac (usually older devices).
Have you tried disconnecting all other external devices in case one of them is causing a problem?
Make sure to connect the drive directly to the Mac. Also try using another USB port especially on the other side of the laptop if possible. Are you using any adapters for connecting this drive to the Mac (USB-C to USB-A perhaps)?
Within Disk Utility click "View" and select "Show All Devices" so that the physical drives appear on the left pane of Disk Utility. Select the physical drive and erase it as GUID partition and MacOS Extended (Journaled)....or even exFAT. If it produces an error when erasing the physical drive, then immediately try erasing it again. I have had a few instances where the first attempt fails, but a second attempt immediately afterwards will succeed (don't recall the error number).
You can try writing zeroes to the beginning of the drive to destroy the partition table. You can use the command line to do this. Sometimes macOS gets confused if things just are perfect with the partition table and values at the beginning of the drive. If you are familiar with the command line I can provide some information to point you in the correct direction.
Why did you try to erase the drive? If you were having an issue using the drive, then perhaps the same issue is preventing the drive from being erased.
Did you ever install the drive manufacturer's proprietary software at any time? Maybe this software is interfering.
Try booting into Safe Mode to see if you can erase the physical external drive.
Normally I would suggest using DriveDx to check the health of the external drive, but the download link has been broken for a while now (tried to report it to them, but no response so far). I'm not fond of the other similar apps as they don't always show the full details of the health information (nor provide a text report for easy posting here). If you are familiar with the command line, then I can suggest an option and provide basic instructions for gathering the heath report for the drive, although it will require installing a special USB driver with no guarantees that the USB controller chip on the external drive will allow access to the drive's health information.
Do you have any other computers where you could try using this drive to see if the issue is with the drive/cable or this laptop/OS?