Yes, just plug in the keyboard (or connect if wireless), and type on that Windows keyboard.
Your computer will (nearly always) accept whichever input is used.
However, the differences are almost never more than two keys (the positions of the Windows key and alt key would be reversed on your Mac's keyboard, and you may be able to change even those through software), and the differences for most uses would not be significant at all. (Almost all keys would not work any differently between the macOS system, or the Windows system)
In other words, just use the Mac's keyboard. If you encounter a particular situation that requires something specific about a Windows keyboard, then just plug in a Windows keyboard, and work away. No need to disconnect or remove the Apple keyboard.