With 12.7.6 you can run a much newer version than 10.5.2.
I don't know exactly which, but maybe 10.7.*
(for comparison, macOS 11 Big Sur can use up to 10.6.5, so already above your 10.5.2).
Make sure that you are logged in to the App Store with the same Apple id that was used to purchase.
If it still does not appear under Updates, you can temporarily place the application in the trash (but DON'T EMPTY IT); click on your account at the bottom left, and locate Final Cut Pro amongst your purchases. Click to Download. You will be warned that the current version is not compatible, and asked if you want the most recent that works on your OS. Confirm.