From macOS Catalina 10.15 and up, issue the following to list the available install images:
softwareupdate --list-full-installers
This will produce a list similar to this:
Finding available software
Software Update found the following full installers:
Title: macOS Ventura, Version: 13.4.1, Size: 11513284KiB, Build: 22F82, Deferred: NO
Title: macOS Ventura, Version: 13.4, Size: 11511926KiB, Build: 22F66, Deferred: NO
Title: macOS Ventura, Version: 13.3, Size: 11500012KiB, Build: 22E252, Deferred: NO
Title: macOS Monterey, Version: 12.6.7, Size: 12115649KiB, Build: 21G651, Deferred: NO
Title: macOS Monterey, Version: 12.6.6, Size: 12108302KiB, Build: 21G646, Deferred: NO
Title: macOS Monterey, Version: 12.6.5, Size: 12115811KiB, Build: 21G531, Deferred: NO
Title: macOS Monterey, Version: 12.6.4, Size: 12116269KiB, Build: 21G526, Deferred: NO
Title: macOS Big Sur, Version: 11.7.8, Size: 12120994KiB, Build: 20G1351, Deferred: NO
Title: macOS Big Sur, Version: 11.7.7, Size: 12121126KiB, Build: 20G1345, Deferred: NO
Title: macOS Big Sur, Version: 11.7.6, Size: 12120959KiB, Build: 20G1231, Deferred: NO
Title: macOS Big Sur, Version: 11.7.5, Size: 12120799KiB, Build: 20G1225, Deferred: NO
Title: macOS Big Sur, Version: 11.6.6, Size: 12121263KiB, Build: 20G624, Deferred: NO
Title: macOS Big Sur, Version: 11.6.5, Size: 12121404KiB, Build: 20G527, Deferred: NO
Title: macOS Big Sur, Version: 11.6.4, Size: 12147782KiB, Build: 20G417, Deferred: NO
Title: macOS Big Sur, Version: 11.6.3, Size: 12143674KiB, Build: 20G415, Deferred: NO
Title: macOS Big Sur, Version: 11.6.2, Size: 12141944KiB, Build: 20G314, Deferred: NO
Title: macOS Big Sur, Version: 11.6.1, Size: 12137180KiB, Build: 20G224, Deferred: NO
Title: macOS Big Sur, Version: 11.5.2, Size: 12149332KiB, Build: 20G95, Deferred: NO
Title: macOS Catalina, Version: 10.15.7, Size: 8055650KiB, Build: 19H15, Deferred: NO
Title: macOS Catalina, Version: 10.15.7, Size: 8055522KiB, Build: 19H2, Deferred: NO
Title: macOS Catalina, Version: 10.15.6, Size: 8055450KiB, Build: 19G2021, Deferred: NO
Title: macOS Mojave, Version: 10.14.6, Size: 5896894KiB, Build: 18G103, Deferred: NO
Using the version numbers from above, issue the following to install Ventura 13.4.1, for example:
softwareupdate --fetch-full-installer --full-installer-version 13.4.1
The installer will be present in your /Applications
folder.