Apple digitally signs the installers used by its software updates. The certificates Apple used to sign these installers have expiration dates which is causing old installers are no longer working.
But there is a trick to still download old installers.
Apple has re-signed and re-released older installers, giving them a new expiration date of 14 April 2029. You can download new installers from links on these pages:
- macOS 10.15 Catalina
- macOS 10.14 Mojave
- macOS 10.13 High Sierra
- macOS 10.12 Sierra
- OS X 10.11 El Capitan
- OS X 10.10 Yosemite
In Catalina there is also the possibility to download a installation by the complete release number in the Terminal (works with High Sierra 10.13.6 and Mojave 10.14.6):
softwareupdate --fetch-full-installer --full-installer-version 10.13.6