As Grant says iOS 12 is for iPhones and iPads not Macs. It is however possible to connect say an iPhone via a USB to Lightning cable to your Mac and then download and install the iOS 12 upgrade using iTunes on the Mac. This is sometimes quicker than doing it on the phone itself, saves battery life and allows you to auto backup the iPhone prior to the upgrade but is not compulsory.
Since you say you are running macOS 10.13.6 - still the latest version as of today, this will run the new/latest iTunes 12 which will support all the current iPhone models.