You can use a Windows 10 (or 11), Windows 8.1, or Windows 7 device to quickly create a USB bootable installation media to reinstall macOS Monterey, Big Sur, or Catalina on your Mac. However, if none of your devices (MacBook, MacBook Air, MacBook Pro, iMac, Mac Pro, or Mac Mini) are not working when you need them the most, you can use a Windows computer to rescue your Apple device. This is one of the main reasons you should consider making a macOS bootable USB when your device works properly. If the unexpected happens with an Apple computer, you can use a macOS bootable USB with the installation media to repair it. It’s just a matter of time until your computer will refuse to start, which could happen for many reasons, including (and not limited to) file corruption, hardware failure, and buggy update.
It does not matter whether you use macOS, Windows 10, or Windows 11.