I heard that investing in bitcoin is dangerous. How true is this?

Dangerous enough if you don't invest at the right time with the right amount. If you invest in bitcoins with a low value but with a high buying price, you literally wasted money. If a crash or dip comes up, the value of your bitcoins may probably end up zero. But the possibility is veru low so I suggest you still invest even if it is dangerous. Place money you're willing to lose.