Generally, hamsters are lying down and dumping when they die, and their bodies are stiff, but they will not die if they shrink into a ball. Contraction requires muscle strength, so this situation must be alive. Maybe it's a physical problem, maybe the food doesn't agree with your mouth, maybe you're sleeping, and so on. It is recommended to adjust to a warm environment or go to the vet.
I hope it is useful to you, and I hope to adopt it ~