Sometimes automatic updates and installs don;t work, and in other cases you might need an installer somewhere with no internet connection. In those cases you can download the installers ahead of time, and install them directly.
The web site "OSX Daily" maintains a list of locations where the macOS (and Mac OS X and OSX) installers can be downloaded from: