Upgrade HDD to SSD in High Sierra and import a Time Machine backup

There's 2 ways to do this, I prefer the first since it ensures you start with a macOS install.

  1. Install the blank SSD in your Mac.
  2. Boot while holding ⌥⌘R for Internet Recovery.
  3. Follow the steps to download and install macOS on your SSD.
  4. During Setup Assistant, when prompted if you'd like to transfer your files, choose to transfer from a Time Machine backup.
  5. Follow the steps to important your content and settings from your Time Machine disk.

Alternatively you can use the Time Machine backup for the initial macOS install.

  1. Install the blank SSD in your Mac.
  2. Connect your Time Machine backup disk.
  3. Boot while holding ⌥ and choose your Time Machine disk from Startup Manager.
  4. Follow the steps to install macOS on your SSD using the Time Machine disk.