Below is a comprehensive guide on how to achieve this. This guide assumes you have already acquired the macOS .dmg file and a USB drive (at least 16GB recommended).
By following these steps, you should now have a bootable USB installer for Mac OS X created from a DMG file. create mac os x bootable usb installer from dmg
Creating a bootable macOS USB installer from a .dmg file is a common task for IT administrators and users performing clean installs on older Mac hardware. Below is a comprehensive guide on how to achieve this