why is it asking for my credit card details when i try to download apps that are free?

I have just gotten a new phone a I phone 7 and have tryed to download apps but is telling me that I need credit card details and when put in saying not working someone please help
You have to select None as payment method.
Here is an article from Apple on how to:
https://support.apple.com/en-jo/HT201266

Original thread: https://forums.imore.com/threads/why-is-it-asking-for-my-credit-card-details-when-i-try-to-download-apps-that-are-free.390942/