Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:4:154

And We raised over them the mount for ˹refusal of˺ their covenant; and We said to them, "Enter the gate bowing humbly", and We said to them, "Do not transgress on the sabbath", and We took from them a solemn covenant.  

And We raised above them the Mount, by the covenant with them, that is, on account of the covenant made with them, that they might fear, and so they accepted it; and We said to them, while it cast a shadow ˹hovering˺ above them: ‘Enter the gate, the gate of the town, bowing’; and We said to them, ‘Transgress not (a variant reading ˹of lā ta‘dū˺ is lā ta‘addū, where the original tā’ ˹of lā tata‘addū˺ is assimilated with the dāl, in other words ˹it is similar in meaning to˺ lā ta‘tadū, ‘do not act unjustly ˹in˺’) the Sabbath’, by fishing during it, and We took from them a firm covenant, over this, but they broke it.
القرآن:٤:١٥٤

وَرَفَعْنَا فَوْقَهُمُ الطُّورَ بِمِيثَاقِهِمْ وَقُلْنَا لَهُمُ ادْخُلُوا الْبَابَ سُجَّدًا وَقُلْنَا لَهُمْ لَا تَعْدُوا فِي السَّبْتِ وَأَخَذْنَا مِنْهُمْ مِيثَاقًا غَلِيظًا  

{ورفعنا فوقهم الطور} الجبل {بميثاقهم} بسبب أخذ الميثاق عليهم ليخافوا فقبلوه {وقلنا لهم} وهو مُظلِّ عليهم {ادخلوا الباب} باب القرية {سجدا} سجود انحناء {وقلنا لهم لا تعدوا} وفي قراءة بفتح العين وتشديد الدال وفيه إدغام التاء في الأصل في الدال أي لا تعدوا {في السبت} باصطياد الحيتان فيه {وأخذنا منهم ميثاقا غليظا} على ذلك فنقضوه.