that Mac can run up to macOS 10.15 Catalina, but don't be in a rush to do so.
These next versions of macOS re-arrange the disk drive structure, and may be slightly more perilous than usual. Be sure you have a Trusted, current BACKUP on hand before proceeding to 10.14 Mojave, which uses the more modern Metal drawing system.
The next step, to 10.15 Catalina, may be an even bigger shock, because many older macOS utilities will NOT be supported under Catalina. only 64-bit version are supported. To help you find these the free utility Go64 is available here:
https://www.stclairsoft.com/Go64/index.html
--------
The versions you seek should be available to you through the Mac App Store. However, they are "Put Away" so that users do not download them by accident. To get an App Store download, use the links in this article:
How to download and install macOS - Apple Support
NB>> if you have a WORKING MacOS, using the full features inside that older version to obtain a newer Mac App Store version are almost ALWAYS the best way to proceed, rather than trying more convoluted methods such as recovery mode or bootable USB sticks.
EDIT: Phil0124's excellent advice was not showing when I started to compose. Nothing I wrote is intended to diminish what was said in any way.