Try booting into Safe Mode and running the the upgrade. If this works, then perhaps you have some third party software installed that is interfering with the normal operation of macOS.
On Thursday, I encountered an issue with a Mac I was testing where there were times where I got the spinning wheel in the Software Update section of System Preferences. Even using the command line to check for updates just got stuck and would not time out or error out. I just assumed it was some issue with the Mac I was repairing, or an issue with our network since we do use a caching server for macOS updates, or the fact the Mac is managed by our organization and has some type of misconfiguration. Perhaps Apple is having some sort of server issue this week.
Are you looking to patch the current OS or are you looking to upgrade to a later version of macOS? If you are looking to upgrade the Mac to a newer major version of macOS, then you can find links to various macOS installers withing this Apple article which also includes optional instructions for creating a bootable macOS USB installer (if this is an Apple server issue, then a new OS will likely have the same problem until Apple fixes their server issues):
How to create a bootable installer for macOS - Apple Support