How are orphaned blocks dealt with on the blockchain?

How are orphaned blocks dealt with on the blockchain
Introduction: 
When a new block is created, it is first given to the miner who successfully solves the proof of work. The winning miner then broadcasts the block to the network, and everyone updates their blockchain accordingly. If two miners solve the proof-of-work roughly simultaneously, then there will be two competing versions of the blockchain. One branch will eventually become longer than the other, and that branch will be considered the valid one. The blocks in the losing department will be called “orphaned.” 
 
There are a few different ways that orphaned blocks can be dealt with: 
1) The blocks can be ignored and not added to the blockchain: It is up to the miners to decide which blocks they want to add to their blockchain. If a miner receives an orphaned block, they can ignore it and not add it to their chain. 
 
2) The blocks can be added to the blockchain but not used for transactions: In this case, the blocks will still be visible on the blockchain explorer but will not be used to confirm any transactions. 
 
3) The blocks can be completely removed from the blockchain: This is generally considered to 
be the most secure option, as it ensures that no invalid blocks are ever added to the chain. 
However, it also means that if a valid block ends up getting orphaned, then any transactions 
included in that block will also be lost. 
 
Orphaned blocks can occur for various reasons, but the most common one is simply due to network latency. If two miners solve the proof-of-work roughly simultaneously, one miner may broadcast their block to the network before the other. In this 
case, the second miner’s block will get orphaned. 
 
There are a few different ways to deal with orphaned blocks, but ultimately it is up to the miners to decide which method they want to use. Most importantly, all invalid blocks are properly dealt with, so they can’t be used to confirm transactions. 
 
How are orphaned blocks dealt with, and what does the network impact? 
When a new block is generated, it is given to the miner who successfully solves the proof of work. The winning miner then broadcasts the block to the network, and everyone updates their blockchain copy accordingly. If two miners solve the proof-of-work at around the same time, a split in the blockchain can occur, creating two competing versions of the truth. One branch will eventually become longer as more blocks are added, and this branch will be considered valid. The blocks on the losing department are called “orphaned.”  
 
Depending on how they are dealt with, orphaned blocks can have different impacts on the network: 
1) If they are ignored and not added to the blockchain, this can lead to data inconsistency as different network participants will have different versions of the truth. 
 
2) If they are added to the blockchain but not used for transactions, this can lead to decreased security as it becomes easier for attackers to create competing versions of the blockchain. 
 
3) If they are completely removed from the blockchain, this is generally considered the most secure option, as it ensures that no invalid blocks are ever added to the chain. However, it also means that if a valid block ends up getting orphaned, then any transactions included in that 
the partnership will also be lost. 
 
In conclusion, it is up to the miners to decide which method to use when dealing with orphaned blocks. Most importantly, all invalid blocks are properly dealt with, so they can’t be used to confirm transactions.