This is because whoever knows the private key to a crypto wallet is the owner of the funds. Usually, exchanges don’t give you access to the private key(s). And even if they did give you access, it’s still not safe because there’s nothing stopping them from moving the funds to a different account without your knowledge.
I wouldn’t recommend buying crypto unless you at least have a decent understanding of public/private key crypto