I still use Mojave as my daily driver, you can't use the latest Pro Apps (Final Cut, Logic...) on Mojave but if you've already purchased them the App Store will let you get the oldest version compatible with Mojave.
Mojave is a good balance between compatibility/support as it supports 32-bit apps if your apps don't work on newer macOS versions and it was supported up until the very end of last year.
I would also suggest if you feel a bit un-easy about using an unsupported OS, there is always Catalina.
Catalina is an odd version for a 5,1 as it has 2 ways to be installed.
The first is with OpenCore, which can be a bit overwhelming to start off with but is much easier and cleaner once you get it installed or there is the
dosdude1 Catalina Patcher. This way of installing Catalina is much easier however you lose HEVC hardware acceleration and the ability to update macOS (and security patches) over the air like a modern Mac.
I first used the Catalina Patcher on my 2010 MacBook and that ran quite well and was super easy to install and setup but then more recently I used OpenCore to install Big Sur.