To upgrade/downgrade a Mac, or fix a Mac that won’t turn on, you can create a bootable disk to boot Mac from USB. You need to prepare an empty USB and install macOS on it, then boot the Mac from the USB drive.