Nobody can prevent me, because I'm running a node, the important thing is that I don't have to change some fundamental points, but if I add extra code, nobody will be able to prevent me.
Lets use an actual example.
Lets say you decide to modify block 696,200 (an existing block) for example change a transaction in it. My node that doesn't have this block connects to your node and requests it, but as soon as the modified block is received by my node (running the correct code) that block is rejected. If you continue feeding bad blocks, my node will ban your IP address for malicious behavior.
Now lets say you change a consensus rule, like increasing the block weight to 10 MB (it is currently 4 MB) and then mine a new block that is 10 MB. Again the same scenario as above occurs. As soon as my node (or any other bitcoin node) receives this block that breaks the consensus rules it will be rejected and your IP address will be banned for being an altcoin.
P.S. Keep in mind that anything that is not part of the consensus rule (eg. using RFC6979 when signing transactions, using BIP39 for the wallet, how the blockchain is stored on disk, ...) can be changed without a problem.