If you harm yourself by following haram, Allah swt knows this and there are many ways Allah swt can take rizq away.
Haddii qofka la sixrayaa uu yahay dabeed (naari), waxa aan soo qaadayaa girgire bir ah, dab ayaa aan ku shidayaa.