When using the special startup keys to access Recovery Mode it is critical that you press & hold those keys immediately after hearing the startup chime. If it takes you more than a second to press those keys after hearing the startup chime, you may have missed the very small window of opportunity necessary for those keys to be recognized. Definitely use a wired keyboard as suggested by @den.thed. I would recommend using Command + Option + R to access Internet Recovery Mode since just using Command + R to access local Recovery Mode may not work well if the internal drive is failing.
Install macOS on an external storage device and use it as a startup disk - Apple Support
The most likely culprit is a failing hard drive as that matches the startup failure of the progress bar getting about a 1/3 of the way & failing, plus it is the easiest & least expensive thing to resolve. If you have an external drive, then you can try installing macOS to the external drive & booting macOS from the external drive to see how things work. If you can boot from a full macOS installation on the USB drive, then you have at least confirmed the issue is related to the internal drive, file system, or OS installation. Plus you can then easily check the health of the internal drive(s) using DriveDx (free trial period).
Normally I would also suggest creating & trying to boot a Knoppix Linux USB stick, but I'm not sure it will boot a 2019 iMac, or whether Linux Mint would even boot it.