MacTracker says that you can upgrade the OS as far as the latest release of macOS 11 Big Sur. The App Store won't show you Big Sur by default, but you can get it by going through a special Apple Support Web page:
How to download macOS - Apple Support
I looked in the App Store. It indicates that the latest version of Logic Pro X – the only one you can get – is 10.7.8 (updated May 23, 2023). It requires macOS 12.3 (Sierra) or later.
So it looks like you're in luck. I would suggest making a backup of your current system drive before installing any OS upgrade. (Not that I expect things to go wrong, but it's useful to have a way to back out if they do.)
Note that macOS Catalina and later will not run 32-bit applications. You might want to check what (if any) 32-bit applications you are using (About This Mac… / System Report…) before deciding how far to upgrade macOS. Big Sur has the advantage of being the most recent – and, for now, one of the "most recent three"; but High Sierra or Mojave would let you keep running 32-bit applications.