When you switch devices, all the purchases made in the app will remain linked to your account.
The purchase of the app is linked to your account in your device's store, Play Store for Android devices and App Store for Apple devices.
If you can't download the paid version and you had already purchased it, please check the following:
If the paid version is in your previous purchases, in your app store profile.
That both your previous and current device have the same app store.
That the account with which you signed in to the app store is the same in both devices.