If I remember correctly the last macOS version that could run AppleWorks (via Rosetta) was Snow Leopard (macOS 10.6.x). The subesequent macOS was Lion.
At some point iWork came out but wasn't a note-for-note replacement.
Wikipedia has more info than anyone here would.