All M!x versions share the same main gimmick which is the passing of genetics from one generation to the next. The main differences between the multiple versions is the locations, characters, and games. As far as I know, all versions share some of the same locations (like Tamatown, Flower Hills, etc.) and characters (like Mametchi, Violetchi, etc.).
The first Mixes to be released (melody and spacy) have very few differences in terms of games, characters, and locations. There are two special characters and one location that are exclusive to either version. Melody has the characters Orchestrotchi and Melodytchi located in the exclusive Melody Land, while Spacy has the characters Speplanetchi and Himespetchi located in the exclusive Spacy Land. Everything else is the same, so it really depends on your character preferences. It's important to note that in order to unlock all the locations and characters, you must have another M!x to connect with.
The Sanrio M!x was a special M!x that included many Sanrio characters. This one is packed with lots of new characters, some new locations, and games centered around Sanrio. You need another M!x to unlock all of the locations and characters.
The Dream M!x is centered around Dream Town and it's characters. There's some new locations, new games, and three new characters: Yumemitchi, Kiraritchi, and Spacytchi. I'm not sure if you need to connect with another M!x to unlock all the locations and characters, but the answer is more than likely yes.
The 20th Anniversary M!x is all about celebrating 20 years of Tamagotchi. It has characters from all across the various versions, new locations, and new games. This one seems to be the fan favorite out of all of them. As far as I know, this is the only one that does not need to connect with another M!x in order to unlock all of the locations and characters.
It appears that the Anniversary Gift M!x has the same characters and locations as the 20th Anniversary, but with a couple of bonuses. There's new games, a new location, and three new characters: Gifttchi, GiftMametchi, and Santaclautchi. It appears to just be an upgraded version of the 20th Anniversary one, but I could be mistaken. I'm not sure if it needs to connect with another M!x to unlock all the locations and characters...
I hope this helped! ^_^