Any upgrades you purchase are tied to your Google or Apple account. So if you buy a different phone on the same platform and sign into your Google or Apple account with the same id, the Upgrade will follow to that and any other devices you sign into on that platform.
If you have a Android/google device and later decided to switch to Apple (or vice versa), you will need to purchase the upgrades for that platform as well.