For "virtual" macs use the stock MacOS 9 image that you can find on MG and other sites. You'll probably also find many pre-built images you can use.
If you have trouble finding them, you could use the 9th download here, which I made, in qemu:
https://macintoshgarden.org/apps/classilla(This also includes tools for Classilla, but is a known working MacOS 9, if you wish. You do not need the 10th download, which has the Classilla sources and compiler, etc).
Use "qemu-system-ppc -M mac99 -m 512 -hda classilla_build_sys.img -netdev user,id=mynet -device sungem,netdev=mynet -device usb-mouse -device usb-kbd". You may, of course, rename the image.
Note that SheepShaver will only run up to MacOS 9.0.x, and not beyond that. It cannot run 9.1 or 9.2
For real hardware, also use stock MacOS 9 images. Your best bet is usually a "restore" image that originally came with the hardware. This is especially a good idea for laptops.