Do NOT upgrade until you have made a Time Machine or other backup of your startup drive.
How to Upgrade macOS:
The macOS version you can upgrade to depends on the year your Mac was released.
Click the (Apple) menu at the top left of your screen and choose About This Mac.
macOS 10.14 Mojave is compatible with the Macs listed here:
https://support.apple.com/kb/SP777?locale=en_US
❗️ – IMPORTANT – Backup your data, now, before you attempt an upgrade.
Learn How to Back up your Mac with Time Machine:
https://support.apple.com/en-us/HT201250
🖥 – Check the compatibility of your Mac with newer versions of macOS.
https://support.apple.com/en-us/HT201475
✅ - IF your Mac is compatible, then using Safari only, download the macOS upgrade installer app:
Click > Mojave.
Once downloaded, double-click the installer app in the Applications folder to begin the upgrade.