All In-App purchases, including subscriptions, can be used across multiple devices, as long as you are using the same Apple ID.
Here is the FAQ link on how to restore: https://scorecam.pydmsw.com/faq/index.php?action=artikel&cat=2&id=4&artlang=en
Most users who have this issue are using a family plan and, unfortunately, In-App purchases do not work for multiple Apple IDs in a family plan. This is not our policy but one that Apple requires.
the good news is that Apple will not allow you to make the same purchase twice when using the same Apple ID so even if you try to buy it again, you will be presented with a dialog that basically says, "You already made this purchase, would you like to restore?"
Just make sure you are 100% sure which Apple ID you used for the original purchase and the Restore button will work.
Restoring and purchasing is all handled by Apple so if it's not working, maybe try reinstalling the app or restarting the device.
It could also be the case where you installed the app with one ID and tried purchasing with another. That will likely cause issues, so make sure you install the app with the same ID as well.