Sure Al-Qasas

28:8

فَٱلْتَقَطَهُۥٓ ءَالُ فِرْعَوْنَ لِيَكُونَ لَهُمْ عَدُوًّۭا وَحَزَنًا ۗ إِنَّ فِرْعَوْنَ وَهَٰمَٰنَ وَجُنُودَهُمَا كَانُوا۟ خَٰطِـِٔينَ

Da lasen ihn die Angehörigen Fir'auns auf, damit er ihnen zum Feind und (Grund zum) Kummer werde. Gewiß, Fir'aun, Haman und deren Heerscharen pflegten verfehlt zu handeln.

Tafsir 28:8

So she acted upon whatever I inspired her with, placing him in a box and casting it into the sea. The family of Pharaoh found him and took him in, so that Allah’s plan for Moses to become an enemy to Pharaoh by having his kingdom taken away from him and bringing him grief at his hands, comes to fruition. Indeed, Pharaoh, his minister Hāmān and their aides were sinful due to their disbelief, oppression and corruption on Earth.