Depending on the exact age of this computer - Internet Recovery Mode may or may not work
Suggest connecting the computer via Ethernet Cable to Router for the next steps.
Shutdown computer and restart an immediately Hold the 3 key combinations all together >> Command + Option + r <<
If it works a Spinning Globe will appear and start loading. Depending on the Apple Servers and Speed of you connection this can take some time.
Once Fully loaded - It will present options >> Disk Utilities >> View >> View ALL attached Drives.
4 - Choose the Upper Most Drive ( not the volumes indented and list below ).
5 - The drive normally is called Apple Media or Apple SSD - that is the Drive to Erase and format for macOS 10.13 High Sierra and below requires HFS Journaled with the GUID Partition Map
6 - Once that is done >> backup out of Disk Utilities and choose install macOS.
7 - Follow the prompts and it may automatically reboot several time.
8 - Upon a final reboot - Setup Assist will present with the newer version of macOS.