Dex is the short term for Decentralized exchange. Just as the name implies you do not need a third party to transact with this exchange. They are usually built on smart contracts and are autonomous, they utilize “Automated market maker” protocols to determine the prices of assets without a centralized body controlling trades. Examples of Dexes are Uniswap, Sushiswap, Spookyswap, Pancakeswap etc.
CEX also known as Centralized exchanges, these exchanges are controlled by a central body or a central authority. This body enables you to buy and sell assets by matching buyers and sellers via an order book. They have similarities with online brokerage accounts.
The CEX has control over your funds.