Mac storage basics · Disks, APFS and formats
How do I check a drive for errors on a Mac?
Short answer: In Disk Utility, choose Show All Devices, select the volume, then its container and device, and run First Aid on each. Run it from macOS Recovery for the startup disk.
Open Disk Utility, choose View → Show All Devices, select the volume (then its container and the device, in that order), and click First Aid → Run. It checks the file system and repairs what it can.
For your startup disk, the most thorough check runs from macOS Recovery. If First Aid reports errors it can't fix, back up the drive's contents straight away and consider erasing or replacing it.