This question already has an answer here:
The file system on an older Mac mini (early 2009, latest supported OS 10.11) got corrupt, and disk utilities ended up in an infinity verify-can't-repair loop. Thanks to a insightful tip I could mount it on a different machine and restore my files. (I physically removed the disk and mounted it with a USB-to-SATA cable).
I proceeded to reformat the disk, and now want to install a bootable macOS on this disk.
The best action seems to follow the Apple guide "How to create a bootable installer for macOS", which requires me to download macOS 10.11 (El Capitan). It's normally hidden in the App Store, but I found the direct link. Unfortunately, I can't seem to download it on my new Mac: It gives me a warning "OS X can't be installed on "MyNewMac" because the version of macOS is too new.". I know, but don't want to run it, just install on the disk for the older Mac, so I can run it on the early 2009 Mac mini.
How to proceed?