If the installer automatically launches, just close it. It will be saved to the “/Applications/Install macOS Catalina” location. Go to the Mac App Store, search for “macOS Catalina”, and download it. (The Mac mini came with macOS 10.14 Mojave so I used it to download Catalina.) You will need a Mac to download macOS Catalina you can download Catalina from The Mac Go.
Note: The instructions below are the same for macOS 10.13 High Sierra and macOS 10.14 Mojave. I purchased a used 2018 Mac mini desktop and wanted to put a fresh installation of the latest macOS 10.15 Catalina on it.