It is safe to trade on crypto exchanges as long as you have taken measures to ensure that you have not shared your private key with anyone. Custodial exchanges (meaning they hold your crypto for you) are considered less safe than non custodial exchanges. In the case of non custodial exchanges you need to use your wallet to hold your crypto.