They can, but most mainstream distros started dropping support for them a few years ago so software support is getting pretty rough.
Honestly I’d just keep it on Mac OS and explore old Mac OS and its quirks. If you downgrade to 10.4 you can run classic Mac OS games/software in addition to osx software. Mac OS has no drm so just burn a disk and boot off it. 10.4 only needs a single layer dvd, 10.5 needs a dual layer. If it’s an early G5 then any 10.4 installer will work, if it’s one of the last then you’ll need the machine specific restore dvd. You can find all the software you can dream of on Macintosh garden.
USB boot is possible but a little finicky. If you’re going to try Linux use a DVD. Linux is “supported” but it’s not worth the pain of the quirks of USB boot and the quirks of Linux on Mac.
Oh that’s not a G5 that’s an Intel iMac. Yeah Linux will boot just fine on that machine USB or dvd. I’d still play with old Mac OS on it since as soon as you put modern Linux on it becomes just a boring PC that can’t run much to me.

