Only the very first of these G4 iMacs, issued in January 2002 (15 inch) or July 2002 (17 inch) can boot into OS9. All later models can only boot into OSX 10.2, 10.3 or 10.4, or 10.5 if it's the 6,4 model issued in 2003, the 1GHz or faster models only. (They can run OS9 but only in emulation mode within OSX).
These systems are no longer available from Apple: it's possibly you might find install disks from other sources, but be careful because the machine-specific disks issued with the Macs are useless to you - you need the 'Retail' version. Tiger 10.4.11 would be your most useful system, it's stable and fairly well featured for its age: but none of these will be able to cope with many modern web sites.
You may find it very difficult to obtain these systems, so if you are going only to be able to install OS9 you need to be quite sure you have one of these first-issue models or you will be wasting your money.
To identify the issue date, select 'About This Mac' from the Apple menu then click 'More info...'