If you are running an older version of macOS then it likely stopped getting security updates. You can upgrade to macOS 10.15 Catalina which is the current version of macOS. However, make sure all your third party apps are compatible with Catalina before upgrading since Catalina no longer supports 32bit apps.
https://support.apple.com/en-us/HT208436
Here is an Apple article containing links to various versions of macOS 10.11 to 10.15 so if you don't feel Catalina will work for you, then you can install Mojave instead.
https://support.apple.com/en-us/HT201372
Make sure to have a good verified working backup before attempting to upgrade macOS. This is especially important if you upgrade to Catalina in case you find some apps are not compatible and want to downgrade to an earlier version of macOS. However, you should always have good verified working backups because it is impossible to recover accidentally deleted data from an SSD plus an SSD can fail at any time without any warning signs.