When an external drive acts strange, I want to know whether its file system is damaged before I let anything change it. Disk Utility’s First Aid repairs straight away; diskutil has a check-only option.
Point verifyVolume at a mounted volume, a disk identifier or a mount point:
diskutil verifyVolume /Volumes/Backup
diskutil verifyVolume disk4s1
The man page explains what happens: the right fsck program runs, the volume is left mounted or unmounted the way it was, and any storage layer underneath, such as the APFS container, is checked first. It also says a “live” verify, even of the boot volume, is supported in some cases, and that you need to own the disk you verify.
At the end it reports whether it found problems. If the volume is clean, the problem is probably the cable, the enclosure or the app, not the file system. diskutil list shows the identifiers if you’d rather use those.
When it does find damage, the repair counterpart is diskutil repairVolume, which does change the disk. I’d make sure I have a copy of anything important first, or let Disk Utility’s First Aid do it. And keep the difference with hdiutil verify in mind: the hdiutil man page explains that one checks the blocks of a disk image file, not the file system inside it.
Further reading: diskutil.8 man page, hdiutil.1 man page