How proof of work works in Blockchain?
You would be wasting your energy, because the network will simply ignore your blocks.

The rule in Bitcoin is that the best(*) valid chain is to be accepted by nodes in the network. If you add a block that contains an invalid transaction, nodes will discard your block (and any potential successors built on top of that block, even if those contain only valid transactions).

(*) best is defined as maximal sum of difficulties across all blocks in the chain. In case of ties, the first-received tip is used to pick a winner.