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:40:37

The ways into the heavens - so that I may look at the deity of Moses; but indeed, I think he is a liar." And thus was made attractive to Pharaoh the evil of his deed, and he was averted from the ˹right˺ way. And the plan of Pharaoh was not except in ruin.  

the routes of the heavens — the paths that lead to it, and look upon (read ˹indicative˺ fa-attali‘u as a supplement to ablughu, ‘I may reach’; or read ˹subjunctive˺ fa-attali‘a, as the response to ibni lī, ‘build for me’) the God of Moses; for I truly think that he, that is, Moses, is lying’, about his having a god other than me — Pharaoh said this in order to disguise ˹the truth˺. And that is how the evil ˹nature˺ of his conduct was made to seem fair to Pharaoh, and ˹that is how˺ he was barred from the ˹right˺ way, the path to guidance (read sadda, ‘˹that is how˺ he barred ˹others˺’, or sudda, ‘˹that is how˺ he was barred’). And Pharaoh’s guile ended only in ruin, loss.
القرآن:٤٠:٣٧

أَسْبَابَ السَّمَاوَاتِ فَأَطَّلِعَ إِلَىٰ إِلَٰهِ مُوسَىٰ وَإِنِّي لَأَظُنُّهُ كَاذِبًا ۚ وَكَذَٰلِكَ زُيِّنَ لِفِرْعَوْنَ سُوءُ عَمَلِهِ وَصُدَّ عَنِ السَّبِيلِ ۚ وَمَا كَيْدُ فِرْعَوْنَ إِلَّا فِي تَبَابٍ  

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