Yes. If you are playing on a state-regulated legal online casino, you should not worry about your personal information or data being stolen. There have been no recorded data breaches as of February 2021, security is taken just as serious as physical casinos.
If you are playing on an offshore unregulated casino, then the answer is no. It is not safe financially to expect a fair wagering system, fair probability on the games, or fair deposits/withdrawals. It is also very unsafe and unwise to give your personal information and debit/credit card numbers to these rogue websites.