You can download the macOS installers from links contained within this Apple article which also includes instructions for creating a bootable macOS USB installer:
https://support.apple.com/en-us/HT201372
I highly recommend you create a bootable macOS USB installer so you have more options in case something goes wrong. You can just run the installer from within macOS as well, but if you don't have access to another compatible Mac having a USB installer is a good thing to have ready if something goes wrong.
Make sure to have a good backup before attempting to upgrade macOS.