Can I Swap Out A MacBook Hard Drive For Windows
The SSD will need to be formatted / partioned to work with the « bios » on the macbook, after that Bootcamp will be able to allow you to run windows from a separate partition.

I have not done this, but many do have both OSx and windows installed and working on one machine.

Check out Bootcamp : https://support.apple.com/boot-camp.

Edit : macs don’t have « bios »  (only used that term as it is easily understood by those coming from the pc world...) instead there is a bootrom process to get to the desktop from pressing the on button, this link gives a reasonable explanation of that process which checks ram, the self tests and runs the efi to get to the desktop. See http://www.hawkdive.com/2017/09/understanding-mac-boot-process.html?m=1