Praise be to Allah.
The hadeeth referred to was narrated by Abu Dawood (3893), at-Tirmidhi (3528), Ahmad in al-Musnad (6696) and others via Muhammad ibn Ishaaq from ‘Amr ibn Shu‘ayb, from his father, from his grandfather, that the Messenger of Allah (blessings and peace of Allah be upon him) said: “If one of you wakes up in alarm, let him say: A‘oodhu bi kalimaat-illaah il-taammaati min ghadabihi wa ‘iqaabihi wa sharri ‘ibaadihi wa min hamazaat al-shayaateeni wa an yahduroon (I seek refuge in the perfect words of Allah from His wrath and His punishment and from the evil of His slaves and from the evil promptings of the devils and from their presence)’, for then they will never be able to harm him.” ‘Abdullah ibn ‘Amr used to teach these words to those of his children who reached puberty, and for those who had not reached puberty he would write them down then hang it around their necks.
There are some reservations about this isnaad of this hadeeth, because it is one of the reports narrated by Muhammad ibn Ishaaq, who is mudallis (i.e., he used vague words in order to give a false impression) and he narrated by saying ‘an (“from”, instead of “I heard” and so on).
At-Tirmidhi said: This is a hasan ghareeb hadeeth.
Ash-Shawkaani said in Fath al-Qadeer (3588): Its isnaad includes Muhammad ibn Ishaaq, concerning whom the scholarly opinions are well known.
Al-Albaani said: It is hasan apart from the words “‘Abdullah ibn ‘Amr used to teach these words…” Saheeh at-Tirmidhi (3528). See also as-Silsilah as-Saheehah (1/529); at-Ta‘leeq ‘ala Musnad Ahmad, ar-Risaalah edition (11/296); an-Nahj as-Sadeed by ad-Dawsari, no. 111.
Based on that, what is narrated about ‘Abdullah ibn ‘Amr (may Allah be pleased with him) hanging this supplication around the necks of his children is not correct, because the isnaad of this addition to the hadeeth is not saheeh.
With regard to the use of amulets and ta’weez [also spelled ta’wiz, taveez, etc], if it contains words from the Qur’an or du‘aa’ (supplication), then there is a difference of scholarly opinion concerning that, as to whether it is disallowed or permitted.
Undoubtedly disallowing that is a means of preventing objectionable beliefs, especially nowadays. If it was regarded as makrooh (disliked) by most of the earlier generations, even though their time was further removed from innovations, misguidance and polytheistic beliefs, and was closer to the light of revelation and faith, then in times such as our own, when ignorance and innovation are widespread, disallowing it is more appropriate.
For more details on this topic, please see the answer to question no. 10543
And Allah knows best.