Though you say your iMac was purchased in 2015, what is more important to know when hoping to upgrade is what is the model year of the Mac. A late-2015 iMac can run OS 12 Monterey, while a mid-2015 iMac can only run up to MS 11 Big Sur, and a 2014 model only up to 10.15 Catalina.
The macOS version you can upgrade to depends on the year your iMac was released.
Click the (Apple) menu at the top of your screen and choose About This Mac.
Check the Compatibility of your Mac with newer versions of macOS:
➡️ macOS 10.15 Catalina is compatible with the Macs listed here
➡️ macOS 11 Big Sur is compatible with the Macs listed here
➡️ macOS 12 Monterey is compatible with the Macs listed here