Good advice from John Galt, if that doesn't work...
Start up from macOS Recovery
Option-⌘-R
Upgrade to the latest macOS compatible with your Mac.
In Disk Utility>View, select Show all Devices, highlight the top left entry.
APFS won't work for Sierra or earlier, Sierra or earlier needs MacOS Extended Journaled. High Sierra won't work for APFS on earlier Macs.
What has often worked for others is to use this Restore Method instead of CMD+r keys...
Option-⌘-R
Upgrade to the latest macOS compatible with your Mac.
Deleted MacIntosh HD and MacIntosh HD - D… - Apple Community
could not create a reboot volume for apfs… - Apple Community
Remote Recovery Fails to install Sierra -… - Apple Community
Messed up Factory Reset on MacBook Pro Mi… - Apple Community
2017 iMac failing to install Sierra in re… - Apple Community
Clean Install of High Sierra: Multiple Fa… - Apple Community
An Error Occurred While Preparing The Ins… - Apple Community