Disk Utility is unable to repair your internal drive if your Mac is currently booted from that drive. MacOS has an alternate way to diagnose and repair your internal drive. Here’s how.
Start up or restart your Mac. As soon as you turn it on, begin holding Command – S on the keyboard. This tells the Mac not to boot the normal way, but to boot into “single user mode.” The screen should look like the picture below…a black screen with white lettering…like an old DOS computer. The last line of text should end in root#.
Type the following on your keyboard:
/sbin/fsck -fy
Then press the Return key.
Your Mac will run a diagnostic on your internal drive, and attempt to repair any damage it finds. It may take some time, depending on the condition of your drive, how big it is, and how full it is.
At the end, the window will either say that your disk appears to be OK, or that your System was modified (which means it repairs were applied). And the root# prompt will be the last item on the bottom line. Type the following on your keyboard:
reboot
Then press the Return key. Your Mac will restart the way it normally does.