You can’t transfer it. If you cancel it on your old device Apple will refund you what is left on that policy. Apple Care is different amounts for different devices... in store or online, it’s non transferable as stated in the terms.
You then take out a new monthly/up-front plan on the new device.