Praise be to Allah, and peace and blessings be upon the Messenger of Allah.
This intrusive thought does not harm a Muslim's faith as long as it is merely a passing thought that the person dislikes and does not accept. Rather, it is one of Satan's whispers that the Prophet ﷺ informed us about.
The Messenger of Allah ﷺ explained that Satan comes to a person and says: "Who created this? Who created that?" until he says: "Who created Allah?" He then instructed us on the remedy, saying:
"Let him seek refuge with Allah and stop thinking about it."
This means seeking Allah's protection from Satan, cutting off these thoughts immediately, and not dwelling on them or trying to answer or analyze them, because they are deceptive whispers from Satan, not a valid question in the first place.
Allah, the Most High, is the First Creator, before whom there was nothing. He is not created, so it is incorrect to ask, "Who created Allah?" because the Creator cannot Himself be a created being.
Satan's whisper with the question, "Who created Allah?", does not harm a Muslim if they reject it and do not dwell on it. The remedy taught by the Prophet ﷺ is to seek refuge in Allah, ignore the thought, and avoid engaging with it. By Allah's permission, it will disappear.
And Allah knows best.