When the 'Install or remove Windows 10 or later version' option is grayed out, you can reinstall macOS from Recovery Mode to see if it resolves the issue.
This won't affect data on the internal hard drive but install a fresh macOS copy. To reinstall macOS, restart your Mac, then immediately hold down Command + R until you see the Apple logo. In the macOS Utilities window, select "Reinstall macOS" and follow the instructions on the screen to finish the installation.
If unsuccessful, you can create the bootable Windows installer first, rather than selecting all three tasks at once. Try the steps in this Apple's guide.