I don't understand how that is related to IAPs or subscriptions?
If the app has premium features gated behind a subscription, it needs to either use Apple's Subscriptions to check with Apple if your Apple ID has the subscription. Then, it can unlock the functionality.
If the app is using consumable IAPs then it would not be able to check with Apple and would need to store the flag in its own data, either locally or in the cloud. If in the cloud, it could tie this data to your device id so it could be restored if you uninstall & reinstall, but this is more difficult if you have tracking disabled.
Your content that you create could be stored in the cloud and restored the same way. But again, Apple makes it difficult to do this if you have tracking disabled since there isn't an easy "device ID" to get that is the same every time, to my knowledge.