If you still have some control, see if the Disk Utility can sort it out:
https://support.apple.com/guide/disk-utility/repair-a-storage-device-dskutl1040/mac
If not, you can try the fsck (file system check for Apple) command from single user mode:
https://www.applegazette.com/mac/repair-hard-disks-fsck-on-macos/
That article implies Apple is using some type of wrapper around the fsck command. It normally runs at the filesystem level (the numbered lines tagged Apple_HFS, etc. underneath each /dev/disk entry), not the disk level. That makes things a bit opaque as far as expected/standard behavior goes.
https://support.apple.com/guide/disk-utility/repair-a-storage-device-dskutl1040/mac
If not, you can try the fsck (file system check for Apple) command from single user mode:
https://www.applegazette.com/mac/repair-hard-disks-fsck-on-macos/
That article implies Apple is using some type of wrapper around the fsck command. It normally runs at the filesystem level (the numbered lines tagged Apple_HFS, etc. underneath each /dev/disk entry), not the disk level. That makes things a bit opaque as far as expected/standard behavior goes.