I recently installed a fresh copy of macOS Mojave, 10.14.3 on my Late 2013 21.5" iMac.
After a couple of days, the shutdown procedure stopped working. What I get, instead, is a black screen with a grey spinning wheel. This is a computer that I've had for years, and just recently has started having this issue.
This is what I have tried to solve the shutdown issue:
NVRAM reset (Reset NVRAM or PRAM on your Mac)
Apple Hardware test (no issues found)
Removed all login items from my user account
Left the computer waiting the entire night to see if it would eventually shutdown (it didn't)
Is there anything else I could try? Is reinstalling macOS going to help?