Download the latest version of TransMac (the installer is the same for trial and full).

Create a bootable macOS installer on a USB stick to fix a non-booting Mac.