Depends on what software you need to run. I have a similar model running as a file server and it’s on Mojave. If you need to run old 32 bit apps, go no higher than it. As a minimum you should be on High Sierra for APFS support. Catalina should probably run fine.