Just practice safe computing habits. Here is an excellent article written by a respected forum contributor with tips for safe computing habits:
Effective defenses against malware and other threats - Apple Community
Of course the longer an OS (even macOS) goes without security updates, the more likely the system (or an installed) app will be vulnerable to something (even a fully supported OS or app can be vulnerable, but at least once the vulnerability is discovered it can be patched).
If security is that much of a concern for you, then you should either purchase a new computer which can run the latest versions of macOS. Some jobs require a fully supported OS and if this is the case, then running an outdated unsupported OS can be a major problem for you especially if something bad happens and it is traced back to you using an outdated unsupported OS. Most people probably won't be too concerned about this as their jobs are not that sensitive to security.
Another option would be to install a non-Apple OS such as Linux Mint instead, but this requires you to learn a new OS and most likely use other apps to do your work since most proprietary software will not run on Linux. Linux is not for everyone, but it is a good way to extend the useful life of older computers. Linux Mint should run fine on most 2017 and earlier non-USB-C Macs.