For iOS 12 you need iTunes 12.8.0.150 or better running on OS X 10.11.4 or better. See How to upgrade to OS X El Capitan - Apple Support if required.
Assuming a suitable version of iTunes is in place then in Finder use the menu item Go > Go to Folder..., copy the following text, paste it into the dialog box and press enter:
/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/Current/Resources
Unlock your device and connect it to USB. Double click on MobileDeviceUpdater in the folder that has opened. It should notify you of a software update. Install it and iTunes should hopefully recognize your device.
Do you have a backup in iCloud? If you could find a willing help or an Apple Store that can help you restore the device, which will update it to iOS 12, then you can restore your backup over the air.
tt2