The wallets that you use are not the same wallet that an Exchange use. they are the same as they are software used to manage and generate private keys but in exchange they thousands of addresses then synchronize with the full node (or several full nodes) managed by the platform.
When you make a deposit, the platform software generates a Bitcoin address and once the coins are sent, they are verified using the full node managed by the platform. After receiving sufficient confirmations, the database in the platform is updated to update your account balance with the deposited amount.
Here ends the role of bitcoin or cryptocurrencies and everything that happens after that is centralized as your balance is managed in the database.
When you withdraw, everything is verified, a transaction is created from the balance on the platform, and money is withdrawn, while reducing the amount withdrawn from the database.
The previous process is hot storage, and any extra funds funds are transferred to cold storage to avoid being stolen, as the platform only needs the necessary funds to withdraw at that moment.
An example of *wallet* that a small platform can use
https://btcpayserver.org, larger platforms hire developers to write from scratch