It may also be worth switching from a Wi-Fi connection to an Ethernet cable, to ensure your internet connection is as reliable as possible. If you're running low, open up the Apple menu, click 'About this Mac' then go to Storage > Manage and free up some disk space there.
To make sure you do, open up the Apple menu and click on 'About This Mac.' Select 'Storage' then check to make sure you have enough space on your hard drive. Typically, a macOS download fails if you do not have enough storage space available on your Mac.
Another reason could be that you simply do not have enough space on your computer.