The current Pages, Numbers, and Keynote in the Mac App Store require macOS Catalina or Big Sur. Nothing older. Apple dropped the iWork branding back in Oct 2013 and now the apps are known as Pages v11, etc. A mid-2012 Macbook Pro can upgrade as far as Catalina.
This will take some planning though as Catalina only supports 64-bit applications, printer and scanner drivers. You can use the free Go64 application to see what 32-bit applications you presently use in Mojave. If you get past that hurdle, perform a Time Machine backup and then proceed using Safari only to the How to get old versions of macOS, where you will find the link to Catalina in the Mac App Store. Once Catalina is installed, visit the Mac App Store and download Pages, Numbers, and Keynote.