This is a mistake that many new investors make so it is important to store your funds in good wallets when buying and selling bitcoin there is a big risk in exchange wallets. If the exchange is hacked or shut down for some reason then there is a possibility of losing your bitcoin this is because the private key of this wallet is with the exchange and not with you that is why you can use hardware wallets where your bitcoin private key is stored safely offline. If you want to hold large amounts of Bitcoin for a long time then you should definitely use a hardware wallet this will give your bitcoin maximum protection.