If you have the Early-2013 model, then it can run up to macOS 10.15 Catalina which will stop receiving security updates once Apple releases the new version of macOS Venture very soon.
If you have the Late-2013 model, then it can run up to macOS 11.x Big Sur which is currently still receiving security updates for another year.
Once Safari is unable to properly access websites, then you will need to resort to using third party web browsers such as Firefox, Google Chrome, Vivaldi, or some others. As long as you are not concerned about macOS receiving security updates, then you will be able to continue using the laptop for many more years unless you have other software that requires an online connection and a newer version of macOS. At some point software that requires an online connection will stop working as those apps stop receiving updates from their developers. Also developers will stop supporting their apps on older versions of macOS, but this varies by developer. Some developers tend to support their apps for 10 years, while others will only support their apps on the most recent versions of macOS which Apple still supports (usually the current OS and the two prior versions).