The Prophet said: "Do not seek knowledge in order to show off in front of the scholars, or to argue with the foolish, and do not choose the best seat in a gathering, due to it (i.e. the knowledge which you have learned) for whoever does that, the Fire, the Fire (awaits him)." (Using translation from Ibn Mājah 254)
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ «لَا تَعَلَّمُوا الْعِلْمَ لِتُبَاهُوا بِهِ الْعُلَمَاءَ أَوْ تُمَارُوا بِهِ السُّفَهَاءَ وَلَا لِتَحِيزُوا بِهِ الْمَجْلِسَ فَمَنْ فَعَلَ ذَلِكَ فَالنَّارُ النَّارُ»