Normally, whenever a miner discovers a block, they immediately broadcast it to the network so everyone becomes aware and can start working on the next block. However, in Selfish Mining, the miner (or a large mining pool) hides the discovered blocks and strategically releases them in order to:
Render other miners’ blocks useless (orphaned).
Claim a larger share of the block rewards for themselves.
This is one of the ways to eliminate confirmed blocks, and there are several other methods that also result in the removal of a confirmed block.
You missed the fact that it needs to be approved by the majority of miners/nodes. Even though this is theoretically possible, but would be too expensive to execute.