While it may be trivial in implementation, its unrealistic due to the cost.
>In reality, the Bitcoin network has proven resilient enough to withstand a 51% attack over the years. In fact, due to the size of the Bitcoin network and the extent to which hash power is decentralized, along with the cost of mining equipment, it’s prohibitively expensive to attack Bitcoin. We estimate it would cost over $13 billion
https://learn.eqonex.com/news/what-51-attack-and-how-much-wo...