PostCodes are region specific. If you are selecting a Country the Postcode must match that country's PostCode structure and length.
If it's not accepting it, it may be because the Postcode you are using does not match the Country that has been selected.
In other words if the country for your Apple ID is set to the U.S. the post code must be one for the U.S. in the format used in the U.S.
You cannot use an address from a country that is different than the one selected for your Apple ID.
See here: link-> Change your Apple ID country or region - Apple Support