First of all you must be using a retail version of OSX 10.5.
Second, while Etcher on macOS can be used to make a bootable macOS installer from a bootable .dmg file. However, unless the .dmg file is a plain raw image file this won't work making it on Windows.
Third, you need to be very careful downloading an item like this from an unknown source. You have no idea if it contains the retail version or a Mac specific version of the installer, or whether the installer is complete, or whether the .dmg was made properly from the source DVD, or whether something malicious has been added to it. You will be better off trying to purchase a used copy of the retail version of OSX 10.5 DVD. Or you need the iMac 20" iSight OSX 10.4.2 DVD that originally shipped with that specific iMac.
Fourth, we are not sure if this iMac G5 is even capable of booting from a USB drive or what it may take to do so. I know that some PPC Macs can boot from a USB drive (or can be made to do so with some hacks), but I have no idea which ones can.