If this was a free app unlocked with an in-app purchase or a subscription and you use the same account on the other device, it should be possible to restore the purchase. You can try going to the Parents section in the app (or Settings) and tapping on the Restore button. The Restore button can also be found on the main screen in some of our newer apps.

This also works if the app was for some reasons locked again on the same device (after reinstallation, update etc.).

If you trying to unlock this app using Family Sharing, make sure that your iOS is up to date: https://support.apple.com/en-us/HT204204 and that you have Family Sharing set up: https://support.apple.com/en-us/HT201088

You can also try to go to the App Store, tap your account button in the upper right corner, tap "Purchased," and then select the account that was used to make the original in-app purchase. Then, try downloading the app again from that screen.