Great question. When you erase an app from your iPhone 7, the app itself vanishes. The data tied to it, like saved games or settings, gets wiped too.
There’s one exception, though. If you Offload an app (via Settings), you keep the user data. It’s like packing a suitcase but leaving the contents inside. Odd, right? For normal erasing, just stick to the wiggle method.
And don’t worry—your Apple ID remembers you bought it. You can always download it again from the App Store. If you want to. (No pressure.)