Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
What happens when you download them ? Are you getting any errors ?
Have you tried resetting all settings ?
If you erased all contents, that means the issue is with your Apple account not with iPhone. You said the ID is working everywhere else, but not on App Store (on iPhone), so there is a chance that the Apple Store part of the ID got disabled. If Apple has noticed any issues with your card or payment information like report of fraudulent charges, refunds etc they will disable the App Store part of your Apple ID. You will still be able to sign in to your Apple ID, change payment details, password ***** but you will not be able to purchase or download or update your apps. Because they limit the App store part of the ID.
Do you have a computer there with iTunes installed ?
Go to Settings > iTunes & App Store. Tap Apple ID > View Apple ID.
Tap Payment Information. Change it to None.
Then sign out from there. Open App Store. Search and download a new app. Enter your Apple ID and password ***** asked. Does it work ?
Also, do you have the two step verification enabled on your account ?
Have you tried resetting the password ?
I want you to download iTunes on your computer, then access iTunes or App Store on your computer and try to download an app or free content from it ? www.apple.com/itunes/download/
This will tell us if the issue is with your iPhone or with Apple account.
Hardware issues won't cause this. You have ruled out software by erasing the iPhone.
May be your network issue ? Did you try this on another WiFi ?
I still believe the issue is with the account. You can also create another Apple ID and test with it.
Sorry for the delay Karol. If you sync and choose to install that app, then Yes, It will transfer. But lets now restore it now.
Connect the iPhone to your computer with the USB Cable.
Open iTunes application on your computer.
iTunes will recognize your iPhone. Select your iPhone in the top left (select iPhone icon)
Then in Summary section, click Backup and make sure "To this computer" is selected.
Then click Restore button and let it restore. It will take some time to restore the iPhone .
After restoring, you will get option to restore your backup. Select Restore from backup and all your files will be restored. Check App Store.