Inserted USB flash drive icon appears, then disappears from desktop
I have an Apple formatted USB flash drive that crashed while I was copying into it. When I insert it into a USB port of an iMac (OS 12.7), the icon appears on the desktop, the iMac drive tries to open the drive's folder. After about 30 seconds it gives up, the icon disappears again and the message "Disk not ejected properly. Eject "Sick stick" before disconnecting or turning it off." appears. The DiskUtility does not see the flash drive. Thus I cannot reformat it. I tried this repeatedly and on another Mac. It always happens. Help.
iMac 27″, macOS 12.7