First, be carefull: make a backup of your disk before exchanging it. Nobody knows what can happen!
Before all, you have to connect your new disk to an external USB port. If the disk is naked, you need to purchase and install it in a SATA USB case. It is cheap and available everywhere on the Web.
Then, follow this Apple article:
BE EXTREMELY CAREFULL TO CHOOSE THE RIGHT VOLUME TO INSTALL THE SYSTEM ON, OTHERWISE, ALL YOUR OLD DATA WILL BE ERASED.
Once the new system installed on your new disk, make the HD exchange between your old in your Mac and the new in the external case. Restart keeping the key "alt" down. A choice of starting volumes will be displayed. Choose the new one and follow the Welcome instructions of the new starting system . When you will be asked to migrate your old data from, choose "a Mac, a Time machine Backup or Startup disk".
See also these Apple instructions:
Bu yanıt yardımcı oldu mu?