Hello,
I have tried to show you in an image which OS are supported with your hardware.

Apple is not supporting your hardware with the latest OS releases, but you can use it till Catalina OS.
https://support.apple.com/en-ug/HT210222
Download macOS
It takes time to download and install macOS, so make sure that you're plugged into AC power and have a reliable internet connection.
Safari uses these links to find the old installers in the App Store. After downloading from the App Store, the installer opens automatically.
- macOS Catalina 10.15 can upgrade Mojave, High Sierra, Sierra, El Capitan, Yosemite, Mavericks.
- macOS Mojave 10.14 can upgrade High Sierra, Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion.
- macOS High Sierra 10.13 can upgrade Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion.
Safari downloads the following older installers as a disk image named InstallOS.dmg or InstallMacOSX.dmg. Open the disk image, then open the .pkg installer inside the disk image. It installs an app named Install [Version Name]. Open that app from your Applications folder to begin installing the operating system.
- macOS Sierra 10.12 can upgrade El Capitan, Yosemite, Mavericks, Mountain Lion, or Lion.
- OS X El Capitan 10.11 can upgrade Yosemite, Mavericks, Mountain Lion, Lion, or Snow Leopard.
- OS X Yosemite 10.10 can upgrade Mavericks, Mountain Lion, Lion, or Snow Leopard.
the resource is taken from https://support.apple.com/en-us/HT211683
Your MacBook pro hardware cannot handle newer operating system software as it requires more resources and new hardware configurations.
I hope this will helpful for you to understand the limitation of your MacBook pro.