Although both species belong to rodents, they are still very different in appearance:
tail: in a mouse, it is long, almost like the body itself; in a hamster, as they said, it is considered invisible;
muzzle: the mouse is elongated and rather narrow, the skull of the hamster is rather wide and almost flattened;
body: in a hamster, it is shorter, most of them have thick hair, so a rounded shape is obtained, and in a mouse, the body is more elongated and thin;
coat: the mouse is gray or white, its relative is multi-colored: white, gray, black, sand, red, usually a mixture (spotted).
So, a hamster, although small, has its own characteristics that you need to find out before buying.