May peace be with you.
There were a group of people (not all) at a point in ancient history that transgressed the matter of the Sabbath for which they were punished (7:166 and 2:65 5:60).
Some read the punishment described by the Quran as a metaphorical reading and some literal (i.e. that they were physically transformed).
From a Quranic perspective, I have no reason to deny either interpretation or a combination of both especially when threats of plagues and destruction are found in the Bible for transgressing Israelites. (Numbers 14:11-12).
I hope that helps, God willing.
Joseph.