I differ from most of the other responders here in that I am not bothered by the "extra step" of Installing a fresh copy of MacOS when changing drives. Since this also a common debugging step when you have problems, I do not see it as much of an annoyance. In fact, in my opinion, it is superior.
I recommend you leave the old drive in place, and install the new Drive in an external enclosure while you install MacOS from scratch.
The first time you start up your Mac after a new install, you will enter Setup Assistant. in Setup Assistant, if you have the old drive connected, you can ask Setup Assistant to copy over any of:
- •Users
- •Applications
- •Settings
- •Other Files and Folders
The source can be EITHER the old drive, or a Time Machine backup of the old drive.
Once you have the new drive working in an external enclosure, THEN do the "surgery" of installing it inside your Mac. Any problems at this stage are due to the items changed, such as the drive cable, since the drive itself and the image on it are "known good".