Not many people were mining with high-tech mining machines when Bitcoin was released (2009, if I'm not mistaken).
Thus, bitcoin was vulnerable to a 51% attack by a big company or an individual with huge resources.
But was there any such attack on Bitcoin around that time?
51% attacks have never occurred in the bitcoin network and will never occur because one company (miner) cannot own close to that amount of mining power possible for that because it is expensive to possess such mining power; additionally, other miners will never allow such an attack to occur and are constantly on the lookout for such attacks.
Only in 2014 did a company called Ghash.io get close to that amount, with a total mining power of 38.24% at the time. The company no longer exists, and no one has ever gotten close to that percentage since. If miners do not collaborate to conduct an attack on the network, they will give the longest chain and dominate the network attackers. 51% is not possible practically because of the way the bitcoin network is built, we don’t need to worry about that.