Understand if the MacBook Pro meets the hardware requirements for Catalina (macOS 10.15.7), or Big Sur (macOS 11.6), these operating systems only support 64-bit applications, printers, and scanner drivers. You will likely want a list of your existing 32-bit applications on OS X Mavericks — before you upgrade to Catalina or Big Sur, and the free Go64 application can provide that list.
Before any upgrade, you want to thoroughly remove per vendor's instructions, any anti-virus software, any device drivers installed by third-party applications, and ideally, boot into Recovery and run Disk Utility First Aid on your Macintosh HD startup drive. Then a last Time Machine backup of OS X 10.9.5. Do not reuse that Time Machine drive with whatever operating system you choose to upgrade too, and use a new external drive for that purpose with that operating system.