How to get the macOS (OS X) installer
I have summarized how to obtain the installer for each version of macOS (OS X) so far.
OS X 10.7 Lion and later can still be downloaded / purchased from Apple today (January 2020).
Also, after getting the installer, I think that you often create a USB memory for installation, but the procedure is explained in the following separate article.