If you want to hold your money for a long time, then you should definitely hold the money in a wallet. Because you are in control of a wallet's private key, it has a much lower risk of being hacked. And your money is completely under your control.
But when you hold your money on an exchange, you run the risk of losing it, because you usually don't have control over the exchanges' private keys. As a result, the chances of your money being hacked on exchanges are high.
So if you want to hold for a long time then you should definitely use a cold wallet or hardware wallet, these will keep your money more secure.
And if you want to save money for trading or frequent transactions then you can use an exchange. Because the exchange offers more benefits in terms of trading or frequent transactions. However, you must use a reliable exchange.