I have been learning gradually on Bitcoin privacy, and I noticed that Coinswap and CoinJoin are often mentioned together, even though they work differently.
With CoinJoin, several people combine their Bitcoin into one transaction, which makes it harder to figure out which coins belong to which person. Coinswap takes a different approach by allowing people to swap coins without creating an obvious link between the coins they started with and the ones they receive.
In a very simple way, CoinJoin mixes coins together, while Coinswap changes the trail between coins, Both are designed to make it harder to track Bitcoin transactions, but they do it in different ways.