The Prophet ﷺ said: He who is asked something he knows and conceals it will have a bridle of fire put on him on the Day of Resurrection. (Using translation from Abū Dāʾūd 3658)
قَالَ رَسُولُ اللهِ ﷺ مَنْ سُئِلَ عَنْ عِلْمٍ يَعْلَمُهُ فَكَتَمَهُ جَاءَ يَوْمَ الْقِيَامَةِ مُلْجَمًا بِلِجَامٍ مِنْ نَارٍ