Transfer SQL Server 2017 Standard license to a new server
Look under the section “ Licensing SQL Server for application mobility” the first bullet details on what you are asking about.  There is no need to remove the license from the first machine prior to installation of the replacement machine. 


  License Mobility is a use right that is available for all editions of SQL Server 2017 software licenses with active Software Assurance (SA) coverage. With this SA benefit, customers can reassign SQL Server licenses to different servers within a server farm as often as needed. Customers can also reassign licenses to third party shared servers. License Mobility is available for licenses under both the Per Core and Server+CAL license models.
  
  
  SQL Server licenses that are not covered with active SA can only be reassigned to a different server within a server farm once every 90 days, and they cannot be reassigned to a third-party web hoster or non-private cloud at any time. (In the event of permanent hardware failure, the 90-day reassignment limit is waived.)
  All SQL Server licenses with active SA can be reassigned to another server within the server farm as often as needed; however, they can only be reassigned to another server in another server farm, or to a non-private cloud, once every 90 days.
  
  
  A server farm may consist of up to two data centers located in time zones that are within four hours of one another and/or with the European Union (EU) and/or European Free Trade Association (EFTA).
  A given data center may only be part of one server farm.
  License Mobility use rights do not apply to SQL Server PDW software.
  License Mobility can benefit customers who license individual virtual machines (VMs) or containers and then want to reassign those licenses to different servers within a server farm—as workloads move dynamically—or to VMs in cloud environments.
  
  


2017 licensing doc