Start with this...
Safe Boot, (holding Shift key down at startup), does the problem occur in Safe Mode? Could take 10 minutes or more.
Safe mode attempts to repair Disks & clears lots of caches & loads safe Drivers, & prevents loading of 3rd party extensions, so if Safe Mode works try again in regular boot.
Let’s see if there’s a locked file interfering.
Open Terminal & paste this command in & prefs enter, it’ll ask for an admin password & not echo what you type, wait for it to finish which will be an empty prompt unless it prints out some locked files, or Operation not permitted…
cd /;sudo find . -type f -flags +uchg
Or thanks to VikingOSX, the Home folder is quicker..
find $HOME -type f -flags +uchg \( ! -path "$HOME/Library/*" \) -prune
https://discussions.apple.com/thread/254749114?answerId=258858927022#258858927022
how can I find my locked files - Apple Community