Installing SSD on MacBook Pro Mid-2012 with Bootcamp

So, I have a Mid-2012 MacBook Pro with 8GB RAM and 1TB HDD, with Bootcamp installed.

I want to replace the HDD with 500GB SSD Hard Drive, but I still have some doubts.

Even after surfing the internet for hours I couldn’t get the answer to that- How do I transfer all my data, i.e. All my files, without reinstalling both MacOS and Bootcamp on the new SSD.

Meaning, I just want to transfer all data including both OS into the SSD so I don’t have to reinstall both the OS