Hello, 10.5.8 is the latest OS G5s can use.
* Mac computer with an Intel, PowerPC G5, or PowerPC G4 (867MHz or faster) processor
minimum system requirements
* 512MB of memory (I say 1.5GB for PPC at least, 2-3GB minimum for IntelMacs)
* DVD drive for installation
* 9GB of available disk space (I say 30GB at least)
Classic/OS9 Apps no longer supported.
Trouble is Apple no longer sells it, check eBay & such for the Retail version, not the Gray Discs...
It'll hold 8 GB of RAM, you'll want at the very least 4 GB, needs matched Pairs...
For DVDs, Toast Titainium if you can find an old enough version, Dragon Burn, or the free Burn App.