You may install the older versions of macOS isolated by downloading the version of Mac OS X or macOS you need and installing it using a bootable installer.