Windows (and doors) do not have layers - but 'belong' to the walls that host them. If the host wall's layer is locked, the OK button will be disabled for the window settings. You can lock/unlock the host wall's layer via the context menu (right click) on the wall itself, via the Layers dialog, the Quick Layers palette among other means.
It is also possible to lock individual elements, including windows. If your window is locked, the OK button will also be disabled. (The window can be locked via Edit > Locking > Lock and unlocked via Edit > Locking > Unlock (All))
Cheers,
Karl
One of the forum moderators
AC 28 USA and earlier • macOS Sonoma 14.7.1, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB