The bitcoin blockchain is a distributed ledger that records each and every transaction made on the network, and since blockchain is decentralized so all the details are public, which actually prevents the double spending of coins.
Now 51% is an attack on blockchain by a group of miners. You cannot change the previous transactions but can alter the future transactions if they can get access to more than 50% of the computing power, they can do the transaction and then reverse it such that they still have those coins, while in reality they already spend it.
You cannot conduct a 51% attack singlehandedly as it requires a group of people. And as the blockchain grows, it will become more difficult to attack.
Now since the Bitcoin blockchain is very large so chances of a 51% attack are low, but small blockchains are at higher risk of the attack.
Do you know any ways for small blockchains to get rid of 51% attacks?