All the steps except the last one are done on a Windows 10 machine. This article shows you how to download a macOS DMG file, format a USB drive using a GUID Partition Table, burn the DMG to the drive and boot your Mac from the USB. But how do you create such a disk if all you're left with is a Windows 10 computer? Fortunately, there's a great tool that you can use for free to create bootable macOS media on a USB drive in a Windows 10 environment.
If your Mac suddenly refuses to boot up properly, you might need a bootable macOS USB installer to make repairs.