I don't expect any experience bitcoiner to be asking this kind of question that using an exchange or a personal wallet, which is more safe, the right answer to this is in this common slogan of not your keys not your coins, exchanges are like banks, they are in control of your asset including the private keys, this means that of anything happens, your money is gone and cannot be retrieved back from them, but when you're using a non custodial wallet, you are in charge.