The for your specific Mac model Instructions for creating a bootable USB drive The correct path to upgrade to newer versions like Big Sur
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyUSB
If you only have a DMG that is not the installer app but a bootable image, restore the DMG to USB: