This is what majority of Muslims believe
But let's look into it based on archaeological research , plus genuine knowledge about geography and wildlife
The parable of the People of the Elephant

What is your understanding of Sura Al-Feel, the story relating the People of the Elephant? How do you know about its historical details, if you reject traditional reports?
The Quran is not a textbook of history. So I do not think it is important, from a Quranic perspective at least, to know the historical details about the story relating the People of the Elephant.
The chapter on discussion, Sura Al-Feel (ch 105), is an allegory. Considering its metaphorical narration, our reading of this short chapter needs to be figurative rather than literal.
Let us go through the verses:
Have you noted what your Sustainer did to the Companions of the Elephant/misjudgement (fīl)? 105:1
Did He not make their plot go astray? 105:2
And He sent upon them birds in flocks (‘abābeel), 105:3
Striking them with stone-hard blows of scribed decree (sijjil), 105:4
Until He made them like chewed up hay. 105:5
Birds communicate with their inner avian Script and establish this communication (“aqeemoo alssalata”) by flying in flocks, while collectively following a leader’s guidance (24:41-56, 38:17-19). As noted in our study Birds and salat, this is the concept of salat (connection, communication), which is exemplified in the Quran by birds flying in flocks. As further observed in our study Meaning of BIRD in the Quran, in all instances where the term bird appears in the Quran, it ALWAYS refers to self and sensory-psychological processes. Thus, in the Quranic idiosyncrasy, birds often symbolize the individual minds in a society. These minds, when organized by right guidance (“birds in flocks”), can create through their conscious, collective effort a reformed society, which can then defend itself against evil forces including external aggressors.
Translated above as “scribed decree”, the term sijjil signifies “a writing” and, tropically, “something that has been decreed by God”: hence, the phrase hijarah min sijjil is a metaphor for “stone-hard blows of chastisement pre-ordained in God’s decree”. See Asad’s Note on 105:4.
Here the Quran seems to simply relay, through metaphorical language, a vision where a victorious defensive counteraction takes place by the aggressed against the much stronger aggressors; and thereafter the evil army is humiliated further as they are totally destroyed against a wake of ‘birds in flocks’ (a reference to rightly guided, reformed minds, i.e., the Prophet’s followers) that hits them with stone-hard blows of chastisement pre-ordained.
As obvious, there is nothing in these verses to support the traditional story, widespread within the Muslim communities. Though baseless and ridiculous, and though one can easily discover the absurdity of this story in its entirety1, traditional Muslims accept it as a historical event. They even try to provide various ‘proofs’ to defend it just because a story-teller in the past wrote it down in an attempt to explain the Surah.
It is better to remain aware of the limitations in our interpretation of a text rather than getting misguided by fabricated stories.
***********************************
Note 1
In the traditional story, Abraha was an Ethiopian Christian king of Yemen. He launched an expedition of sixty thousand men against the Kaaba at Mecca, led by a white elephant, probably along with several other elephants. Below are a few reasons this story looks fabricated and cannot be taken seriously (A good portion of this is paraphrased from Did Abraha ever attack Ka’ba?):
● The Quran doesn’t mention Abraha or his attack on the Kaaba. The Quran mentions the parable of the people of the Elephant/misjudgement only as a short reminder of the related moral lessons – and not as a historical account. There is no evidence that the Sura has anything to do with the traditional story or any of its components, including Abraha, Mecca or Kaaba.
● There is not a single narration in Bukhari, Muslim, or other ‘authentic’ hadith books regarding Abraha and his attack on the Kaaba. The traditional story about Abraha’s attempt to destroy the Kaaba and the related details were allegedly narrated in Ibn Ishaq’s Prophetic biography. This was then re-narrated variously in later story books. Interestingly, there is no mention of it in any of the ‘authentic’ hadith collections.
● Historian Procopius did not mention an army of elephants in his biography of Abraha. Procopius of Caesarea was a famous Byzantine historian of the time who resided in Palestine. He documented the events of the time in several volumes, including detailed information about Abraha, but he did not mention any army of elephants. He did not describe the elephants’ remarkable feat of traveling from Africa to Yemen, and then across deserts and mountains to Mecca, a distance of 800 kilometres. Moreover, according to Procopius and other historians, Abraha died 25 years before the birth of the Prophet, while traditional Muslims believe that Abraha attacked in the same year the Prophet was born.
● A Sabean Inscription, The Inscription of Abraha, rejects these stories about him. This archaeological inscription on a rock in southern Arabia shows that Abraha waged war on several tribes in Arabia, while collecting booty and slaves from every place, and safely returned to his country – without turning into a chewed-up heap of straw on the way. In this text, there is no mention of elephants, birds, Mecca, Quraysh, Kaaba or Abraha’s army’s defeat and collapse after being pelted by stones.
● It appears senseless that God would undertake such special initiative to rescue a small, fragile temple of pagan polytheists from the attack of an army of monotheists. Possibly as a believing Christian, Abraha was ready to go several hundred miles to destroy a small temple in Arabia, a stone structure filled with 360 idols, because he wanted more people to visit his church for guidance. Even then, however, it is silly that God would take it upon Himself to annihilate his entire army for this. Let us not forget that this is the same kaaba which God Himself destroyed many a time with floods and earthquakes which then Muslims had to duly rebuild.
● Transporting elephants over an 800-kilometer desert journey is next to impossible. There is no direct land route from Africa to Yemen that could have been used to bring elephants. Additionally, African elephants are known to be difficult to tame, unlike their Indian counterparts, which are more commonly trained for such purposes. Another major issue is the elephants’ diet; they require approximately 270 kilograms of food and 270 litres of water daily. The distance from Yemen to Mecca is about 800 kilometres, a stretch so challenging that even horses would struggle to make the journey, let alone elephants. The arid deserts and barren mountains along the route from Yemen to Mecca would not have provided sufficient water and forage for the elephants. Given these conditions, it is highly unlikely that an army of elephants could have traversed this long distance to reach Mecca.
● There are numerous contradictions in the narratives about Abraha and the attack on the Kaaba. For example, there are conflicting accounts regarding the number of elephants involved in the event. Some narrations claim there was an entire army of elephants, others mention 70 elephants, some say there were 9 elephants, while another version states there was only one elephant. The chief elephant is said to have been named “Mahmud,” which raises doubts since it is unlikely that an African elephant would have an Arabic name like “Mahmud.” Additionally, there are discrepancies about the timing of the event. One account claims it occurred forty days before the birth of the Prophet Muhammad, another says fifty days, while other claims range from fifteen, ten, twenty-three, thirty, and even up to forty or seventy years before his birth.
It could possibly be referring to Petra instead



More details at following link and alternative meaning in the video
The People of the elephant